Skip to content
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

Merged
merged 3 commits into from
Sep 20, 2023

Conversation

ZhongRuoyu
Copy link
Member

@ZhongRuoyu ZhongRuoyu commented Sep 19, 2023

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew 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 the git-user-config step of the workflow.

- name: Configure Git user
id: git-user-config
uses: Homebrew/actions/git-user-config@master
with:
username: BrewTestBot

The username defaults to github.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.

@ZhongRuoyu ZhongRuoyu requested review from MikeMcQuaid and a team as code owners September 19, 2023 18:11
@github-actions github-actions bot added workflows PR modifies GitHub Actions workflow files automerge-skip `brew pr-automerge` will skip this pull request labels Sep 19, 2023
@ZhongRuoyu ZhongRuoyu changed the title workflows: attribute workflow dispatcher as committer workflows: attribute workflow dispatcher as commit author Sep 19, 2023
@Bo98
Copy link
Member

Bo98 commented Sep 19, 2023

The probably want the committer to remain BrewTestBot because we sign the commit as BrewTestBot, but we could change the author (or co-author).

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a 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!

@MikeMcQuaid MikeMcQuaid requested a review from Bo98 September 20, 2023 07:45
@MikeMcQuaid
Copy link
Member

Good to merge when @Bo98 is happy.

Copy link
Member

@Bo98 Bo98 left a 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.

@ZhongRuoyu ZhongRuoyu added this pull request to the merge queue Sep 20, 2023
Merged via the queue into Homebrew:master with commit 2b1dbf8 Sep 20, 2023
15 checks passed
@ZhongRuoyu ZhongRuoyu deleted the workflows-committer branch September 20, 2023 23:12
@ZhongRuoyu
Copy link
Member Author

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

@MikeMcQuaid
Copy link
Member

Great work again @ZhongRuoyu!

@ZhongRuoyu
Copy link
Member Author

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?

@p-linnane
Copy link
Member

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.

ZhongRuoyu added a commit to ZhongRuoyu/homebrew-core that referenced this pull request Sep 22, 2023
ZhongRuoyu added a commit to ZhongRuoyu/homebrew-core that referenced this pull request Sep 22, 2023
ZhongRuoyu added a commit to ZhongRuoyu/homebrew-core that referenced this pull request Sep 22, 2023
@ZhongRuoyu
Copy link
Member Author

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.

#144738 should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request workflows PR modifies GitHub Actions workflow files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capture maintainer info in commit message for bottle dispatch PRs
4 participants