Commit 3d526d5
committed
fix(ci): preserve manual label retry through gh pr view failure + correct stale-event comment
Two follow-up issues from round-3 Copilot review:
1. **`gh pr view` failure path repeats round-2's manual-label silent
no-op bug**: round-3 split the stale-SHA branch by event type, but
the `gh pr view --json headRefOid` failure path right above kept a
single `exit 0` that applies to all event types. On the manual
label path the earlier step has already removed the
`copilot-review` label, so an exit here is a silent no-op (no
`@claude` trigger, no feedback). Fix: split the failure path the
same way as the stale-SHA branch. Manual label path falls back to
the payload SHA and proceeds (operator gets a CI run for what we
can verify, the marker dedup downstream still skips cleanly if the
payload SHA was stale, and the operator at least sees a real run).
Auto event paths keep the fail-closed `exit 0` (Copilot's next
review or the cron fallback drives the PR forward).
2. **Stale-event comment overstates push semantics**: round-3's
"stale auto event" comment said "a newer push triggers a fresh
review/comment event that will reach this workflow". A bare push
does NOT emit `pull_request_review` / `pull_request_review_comment`
events; only Copilot's review/comment does. Reworded to "a fresh
Copilot review/comment for the newer HEAD will fire its own
event" and added the explicit cron-fallback escape hatch
("otherwise cron fallback handles within ~30–60 min") so the
reader understands the actual recovery path, not an aspirational
one.1 parent 4c77a4d commit 3d526d5
1 file changed
Lines changed: 31 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
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 | + | |
140 | 161 | | |
141 | 162 | | |
142 | 163 | | |
| |||
156 | 177 | | |
157 | 178 | | |
158 | 179 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
165 | 188 | | |
166 | 189 | | |
167 | 190 | | |
| |||
0 commit comments