Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/utils/git/github-automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def pr_request_review(self, pr: github.PullRequest.PullRequest):
for review in pull.get_reviews():
if review.state != "APPROVED":
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, we might also want to check the author associations as a possible follow-up. For example:

Suggested change
if review.state != "APPROVED":
if review.state != "APPROVED" or review.author_association not in ("COLLABORATOR", "CONTRIBUTOR", "MANNEQUIN", "MEMBER", "OWNER"):

(untested)

This would align with what the PR greeter script does:

(github.event.pull_request.author_association != 'COLLABORATOR') &&
(github.event.pull_request.author_association != 'CONTRIBUTOR') &&
(github.event.pull_request.author_association != 'MANNEQUIN') &&
(github.event.pull_request.author_association != 'MEMBER') &&
(github.event.pull_request.author_association != 'OWNER')

That way, users who don't have sufficient permissions to land a PR (but have left a review on the original PR) wouldn't be notified and added as reviewers on backport PRs.

Copy link
Collaborator

@DavidSpickett DavidSpickett Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw if the greeter code looks strange, it's because there's a bug in GitHub. There's a long comment above that snippet to justify that. We have to check for every status other than the one we care about because GitHub never actually sets it. Fun :)

continue
reviewers.append(review.user.login)
reviewers.append(review.user.login)
if len(reviewers):
message = "{} What do you think about merging this PR to the release branch?".format(
" ".join(["@" + r for r in reviewers])
Expand Down
Loading