<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/109429>109429</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [infrastructure] github-automation: local variable 'review' referenced before assignment
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kleisauke
      </td>
    </tr>
</table>

<pre>
    <!--IGNORE-->

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:
https://github.com/llvm/llvm-project/blob/c320df4a2c9d7be10caea9a423d2bfbdcaae6a39/llvm/utils/git/github-automation.py#L497-L500

i.e. that line should probably be part of the for loop:
```diff
--- 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 https://github.com/libvips/libvips/pull/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
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVV1vozoT_jXOzQgEw1e44KJtmn1XqnarXrx7eWTMENw4NrJNq_z7IwNN2p7VSl1EgvHHzDwzzzxw5-RBEzWsuGXFbsMnPxjbHBVJx6cjbVrTnRuW3TFMo-j7tx8_n-6jiGX3LNmx5Gb5fzDmKPUBuAc_EHyT_n9TC3zy5sS9NBqsmbzU5MAJK0cPDLcypnjebTSBH7iHgetOkZsnWZkw3IuBrD1HoxRHViYgzOnEdcewZngH38EPUh_n7Yo7D0pqAtO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