Commit 5e8097f
committed
ci: verify all PR checks before triggering auto-merge
Fixes #6550.
The `auto-merge` job in `pr-quality-check.yaml` relies on native
`needs` gates, which only evaluate jobs inside the same workflow file.
Consequently, failures in external workflows (such as `tests.yaml`)
were not visible to this job, allowing PRs to auto-merge despite failing
tests.
This change adds a pre-check step using `gh pr checks` that:
1. Verifies that the evaluated HEAD commit matches the current commit.
Intended to address race conditions that may occur due to new pushes.
2. Filters out the active workflow run using `github.run_id`.
3. Verifies all external PR checks are in a passing state (SUCCESS,
SKIPPED, or NEUTRAL).1 parent f899f17 commit 5e8097f
1 file changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
140 | 178 | | |
141 | 179 | | |
142 | 180 | | |
| |||
0 commit comments