-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(git config): Set default user.name and user.email in git config #2012
base: main
Are you sure you want to change the base?
Conversation
022dd69
to
4a93dcd
Compare
4a93dcd
to
f3b199b
Compare
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense, yes, I'll update this asap, thanks
Hello 👋
This PR is a (yet another) tentative to have a solution to issue #13 in the
action/checkout
Github 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