[llvm] github-automation.py: Avoid duplicate pings (PR #184321)

Kleis Auke Wolthuizen via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 03:39:24 PST 2026


================
@@ -673,7 +673,8 @@ def pr_request_review(self, pr: github.PullRequest.PullRequest):
                 for review in pull.get_reviews():
                     if review.state != "APPROVED":
                         continue
-                    reviewers.append(review.user.login)
+                    if review.user.login not in reviewers:
----------------
kleisauke wrote:

> I assume this happens if I submit a review, then later do another round of review, right?

Exactly. I guess it's a pre-existing issue, as it can also occur when cherry-picking multiple commits that were approved by the same reviewer. Added a comment with 7dc499ae850ce1a2551083c5d869c691e9643282.

> And I thought about using a set here but:
> A: it's more cryptic (have to look to previous lines to know it's a set)
> B: then we have to think about order or not, not that it really matters here but it's not even worth having to think about

Indeed, plus `pr.create_review_request` doesn't accept a set, see:
https://github.com/PyGithub/PyGithub/blob/v2.8.1/github/PullRequest.py#L577

https://github.com/llvm/llvm-project/pull/184321


More information about the llvm-commits mailing list