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
bottle: author bottle commit as BrewTestBot #7246
Conversation
Maybe just set the brew/Library/Homebrew/dev-cmd/bottle.rb Lines 564 to 566 in 1a53802
|
Yeh, this needs to happen on the original commit and set the |
a543915
to
96cd210
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.
Yeah, this looks like a good change.
@@ -561,7 +561,8 @@ def merge | |||
pkg_version = bottle_hash["formula"]["pkg_version"] | |||
|
|||
path.parent.cd do | |||
safe_system "git", "commit", "--no-edit", "--verbose", | |||
author = "BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>" | |||
safe_system "git", "commit", "--no-edit", "--verbose", "--author=#{author}", |
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 isn't correct. See the Utils.set_git_name_email!
which sets these values based on HOMEBREW_GIT_NAME
which brew test-bot
sets: https://github.com/Homebrew/homebrew-test-bot/blob/355af90a55c07e079009a7862c137d65ee8db75c/lib/test_bot.rb#L348-L350.
As-is this will now override these values and set the author
to @BrewTestBot for all uses of brew bottle --commit
e.g. non-official taps.
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 seems like an Actions-specific bug.
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.
But even if maintainer would run brew pr-pull
locally on their machine, the author of the bottle commit will still not be @BrewTestBot.
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.
HOMEBREW_GITHUB_NAME
etc. should be set in brew pr-pull
for when it calls brew bottle
in that case. If the bottle commit is being created locally, though, I'm not sure why it's desirable to have it attributed to @BrewTestBot anyway?
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.
Just to keep things as they are right now, I guess. If it's not required, then okay.
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.
Sorry 😭
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.
We should probably set those variables in the homebrew/core pr-publish workflow if we haven't already. I think we have but I need to check that it works properly.
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.
Are we pulling those commits or are we creating the bottle commits locally?
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.
Creating locally.
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.
To be that sounds a bit like we should be attributing them to the local user, yeh.
As it is in
test-bot
:https://github.com/Homebrew/homebrew-test-bot/blob/6b2a8182f9d515f80722fda1dadab43ef4334e01/lib/test_bot.rb#L348-L350
Don't know if it is the correct implementation here, but a move must be made, because currently bottle commits are authored by the committer, rather than @BrewTestBot as it should be:
Homebrew/homebrew-core@242aab6
brew style
with your changes locally?brew tests
with your changes locally?