Commit 1b4a826
fix(ci): guard squash branch deletion when promotion PR is open (#931)
sync-main-to-testing fires on every push to main, including normal PR
merges. The cleanup-squash-branch job was unconditionally deleting
auto/promote-testing-to-main regardless of whether a promotion PR was
open, leaving the PR pointing at a deleted ref. GitHub then returns
UNKNOWN mergeability permanently, requiring manual close + re-trigger.
Guard with a gh pr list check: skip deletion if any open PR targets
the squash branch.
Assisted-by: Claude Sonnet 4.5 via pi
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent f144d36 commit 1b4a826
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
| |||
0 commit comments