You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same goes for the regular users — they need emails in form of {user_id}+{whatever}@users.noreply.github.com. This is the current format of the "private" addresses. It exists so that when the users change usernames, the commits are still assigned properly, unlike with the old email format which didn't take this into account and didn't have an id.
The ID can be found at https://api.github.com/users/github-actions[bot]. GitHub Apps have that [bot] suffix, and regular users don't. GitHub Actions is implemented as a GitHub app, hence the [bot] marker. But you can follow the same lookup principle when generating user email defaults.
Nah, I wasn't planning to use this action. I just saw it integrated elsewhere and decided to browse the source code in hopes to borrow improvement ideas for the bot I've got. And saw an opportunity to share some of my knowledge :)
The proper author/committer for the GHA bot is
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
. This will make GitHub show GHA as the commit author. Follow the example ofhttps://github.com/fregante/setup-git-user/blob/2e28d51/index.js#L5-L6.
The same goes for the regular users — they need emails in form of
{user_id}+{whatever}@users.noreply.github.com
. This is the current format of the "private" addresses. It exists so that when the users change usernames, the commits are still assigned properly, unlike with the old email format which didn't take this into account and didn't have an id.The ID can be found at https://api.github.com/users/github-actions[bot]. GitHub Apps have that
[bot]
suffix, and regular users don't. GitHub Actions is implemented as a GitHub app, hence the[bot]
marker. But you can follow the same lookup principle when generating user email defaults.Ref: https://hynek.me/til/easier-crediting-contributors-github/
The text was updated successfully, but these errors were encountered: