-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
workflows: attribute workflow dispatcher as commit author #144087
Conversation
6aa3e93
to
07c8f5d
Compare
The probably want the committer to remain BrewTestBot because we sign the commit as BrewTestBot, but we could change the author (or co-author). |
07c8f5d
to
890e4f9
Compare
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.
Makes sense to me, thanks @ZhongRuoyu!
Good to merge when @Bo98 is happy. |
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.
When merging, worth monitoring a PR merge and a dispatch bottle upload (not one already queued) to make sure it works as expected.
Looks good: #144380 |
Great work again @ZhongRuoyu! |
As a side effect, @github-actions has become the author for automatically-published bottle commits. See, for instance, 3420fb9. Are we okay with that, or do we want @BrewTestBot to author those commits? |
I'd say having @BrewTestBot be the author would be better, but not sure how much effort it would take to get that sorted out. |
…ttle commits Addresses Homebrew#144087 (comment).
…ottle commits Addresses Homebrew#144087 (comment).
#144738 should do it. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?Resolves #144071.
Since 0f6e602 and subsequently 301a2c6, the author of bottle publish commits has been changed to @BrewTestBot. However, based on feedback on Slack, it is more preferable to attribute the workflow dispatcher as the commit author, since that gives appropriate credit to the maintainer who worked on the bottling.
We can do that by removing the
username
override in thegit-user-config
step of the workflow.homebrew-core/.github/workflows/dispatch-build-bottle.yml
Lines 161 to 165 in a4cbfc8
The
username
defaults togithub.actor
, the user who triggered the workflow run (in this case, the maintainer who dispatched the workflow run), so that matches our intended behaviour. The action is also capable of handling hidden emails; it constructs the@users.noreply.github.com
email if the user's email information is unavaiable from the API.