feat(git config): Set default user.name and user.email in git config#2012
Open
chouetz wants to merge 3 commits intoactions:mainfrom
Open
feat(git config): Set default user.name and user.email in git config#2012chouetz wants to merge 3 commits intoactions:mainfrom
chouetz wants to merge 3 commits intoactions:mainfrom
Conversation
Gatormane35
approved these changes
Dec 19, 2024
022dd69 to
4a93dcd
Compare
4a93dcd to
f3b199b
Compare
mScott224
approved these changes
Dec 23, 2024
doni108108doni
approved these changes
Dec 25, 2024
dwg
reviewed
Jan 16, 2025
src/git-source-provider.ts
Outdated
Comment on lines
+277
to
+284
| if (settings.configureUser) { | ||
| if (!await git.configExists('user.name', true)) { | ||
| await git.config('user.name', 'github-action[bot]', true) | ||
| } | ||
| if (!await git.configExists('user.email', true)) { | ||
| await git.config('user.email', '41898282+github-actions[bot]@users.noreply.github.com', true) | ||
| } | ||
| } |
There was a problem hiding this comment.
This configuration would be inaccurate if using a non github-actions token, right?
For example when using create-github-app-token.
Would it make sense to receive the actor slug via input (defaulting to "github-action[bot]") and lookup the id via octokit.rest.users.getByUsername?
Author
There was a problem hiding this comment.
It makes sense, yes, I'll update this asap, thanks
Author
There was a problem hiding this comment.
@dwg I've update the PR. I wanted to add tests but it does not seems straightforward to do. If you can have a look, thanks in advance
Author
|
@joshmgross as it seems you are a maintainer here could you please have a look at this contribution? |
monicadiaz68071978
approved these changes
May 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello 👋
This PR is a (yet another) tentative to have a solution to issue #13 in the
action/checkoutGithub Action.From the last comments on this issue, it seems everybody agreed on such a setting on this action. I've found a PR #584 on this topic opened 3y ago and which didn't applied the last requested suggestions.
So I decided to do an additional proposal with:
I'll try to apply any suggestion to this PR so that we can close #13.
Thanks in advance