Skip to content

[infrastructure] github-automation: pings missing in backport PRs #109429

Open
@kleisauke

Description

@kleisauke

Looking at the GitHub automation routines script (i.e. the one that handles the /cherry-pick command), I think the last line of this code snippet is wrongly indented:

for review in pull.get_reviews():
if review.state != "APPROVED":
continue
reviewers.append(review.user.login)

i.e. that line should probably be part of the for loop:

--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -497,7 +497,7 @@ class ReleaseWorkflow:
                 for review in pull.get_reviews():
                     if review.state != "APPROVED":
                         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])

Noticed this while using this script in another project (see libvips/libvips#4162):

error: Failed while searching for reviewers local variable 'review' referenced before assignment

https://github.com/kleisauke/libvips/actions/runs/10957466259/job/30425668132#step:4:19

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureBugs about LLVM infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions