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/triage: skip for BrewTestBot PRs #9358

Merged
merged 1 commit into from
Dec 1, 2020
Merged

workflows/triage: skip for BrewTestBot PRs #9358

merged 1 commit into from
Dec 1, 2020

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Dec 1, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

The triage workflow is supposed to skip PRs opened by @BrewTestBot. However, it does not which eventually causes problems because @BrewTestBot tries (and fails) to approve it's own PR. Seen in #9334.

Note: I haven't tested this PR

Based on the GitHub API documentation for getting the authenticated user, the user object that is retrieved contains an object with more metadata rather than just the username. To get the username, we can use user.login.

While I haven't tested this PR, I've done something similar in actions/stale#231. There, I also used github.users.getAuthenticated() and then accessed the user's login via .data.login. Also, lower down in the workflow file, another comparison is made between review.user.login and user.login to filter only @BrewTestBot reviews. From these, I'm reasonably confident in this change.

CC: @reitermarkus

@Rylan12 Rylan12 added the critical Critical change which should be shipped as soon as possible. label Dec 1, 2020
@BrewTestBot
Copy link
Member

BrewTestBot commented Dec 1, 2020

Review period ended.

@reitermarkus reitermarkus merged commit eb486bf into Homebrew:master Dec 1, 2020
@Rylan12 Rylan12 deleted the triage-fix branch December 1, 2020 15:27
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 1, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants