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
Doing so makes more sense, as the approver is either the real author of the PR, or whomever decided this needs to be merged and deployed, and having them as an author would provide some useful metadata.
The text was updated successfully, but these errors were encountered:
Hoff currently does not know the correct full name and e-mail address to use for such commits. You can get a name from the GitHub profile, but it might not be the name that you want to use (many people leave the name blank or use a pseudonym on GitHub, but use their real name for internal repositories). As far as I am aware, it is not possible to retrieve the e-mail addresses for a user unless you are authenticated as that user. You could use the {user_id}+{username}@user.noreply.github.com mail and then fix it in the .mailmap, but .mailmap is not that widely respected.
You could even scan for co-authors and their email in the message field although that might be way too much. See: https://api.github.com/repos/danielnoord/pydocstringformatter/commits/b824fee406aae219a06fa21a78c8da98c8097d0f Taken from my own project since I couldn't quickly find a co-authored commit in this project.
However, you would need to iterate over all commits in the repo then as you can't request a list of commits co-authored by a specific Github account. I'm not sure how performant that would be when (for example) a senior who only approves without committing/coding themselves has last made a commit two years ago.
Obviously you would need to handle the case where the approver doesn't have any commits in the repository but it might be better than not doing anything?
Right now hoff will "own" the commit it merges a PR with. Bors does this slightly better, by setting the PR's authors as co-authors for the merge commit. I think we can do even better, by setting the approver as the commit author.
Doing so makes more sense, as the approver is either the real author of the PR, or whomever decided this needs to be merged and deployed, and having them as an author would provide some useful metadata.
The text was updated successfully, but these errors were encountered: