| Issue |
109429
|
| Summary |
[infrastructure] github-automation: local variable 'review' referenced before assignment
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
kleisauke
|
<!--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
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs