Skip to content

Incorrect/incomplete committer/author defaults #27

@webknjaz

Description

@webknjaz

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 of
https://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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions