Commit d3fd2e4
authored
fix: auto-retest workflow to support all branches (#4244)
## Summary
Update the auto-retest workflow to trigger on PR merges to **any**
branch, not just `main`.
## Changes
- Remove `branches: [main]` filter — workflow now triggers on merges to
all branches
- Use `${{ github.event.pull_request.base.ref }}` for dynamic branch
targeting in:
- Concurrency group (per-branch isolation)
- `gh pr list --base` (check PRs targeting the same branch)
- Fix `SKIP_LABELS` detection — replace fragile `grep` pipe with robust
`jq` expression:
- Handles null/missing labels safely (`// []`)
- Case-insensitive matching entirely in jq
- No longer silently swallows `gh` CLI errors
- Properly quotes `$PR_NUM`
## Before / After
| Aspect | Before | After |
|--------|--------|-------|
| Branches | `main` only | All branches |
| Concurrency | `auto-retest-main` | `auto-retest-<branch>` |
| Label check | `gh ... \| grep \|\| true` | Single jq expression |
| Error handling | `gh` failures silently swallowed | `gh` failures
visible |
## Test plan
- [x] Tested jq expression on PRs with skip labels (wip, has-conflicts)
— correctly detected
- [x] Tested on PRs without skip labels — returned empty string
- [x] Tested edge cases (no labels, null labels) — handled safely
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* CI/CD workflow now detects and respects each pull request’s base
branch instead of using a single hardcoded branch.
* Open-PR selection and related steps were updated to operate against
the detected base branch.
* Skip-label detection and logging were simplified for more reliable,
efficient workflow behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 59014fb commit d3fd2e4
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments