Commit 7b69412
authored
Fix maintainer-approval not blocking PRs without approval (#4935)
## Why
PR #4931 switched `maintainer-approval` from commit statuses
(`createCommitStatus`) to check runs (`checks.create`) so the check is
clickable in the GitHub UI. The pending state used `status:
"in_progress"`, which GitHub treats as "still running" rather than
"blocking". This meant all PRs could merge without maintainer approval.
## Changes
Removes the three `checks.create` calls for pending states (wildcard
files, uncovered groups, no approval). When no check run or status
exists for `maintainer-approval` on a SHA, GitHub shows the required
check as "Expected" (yellow dot) and blocks the merge. Approved PRs
still get a success check run (green, clickable).
The result:
- **No approval**: yellow dot, merge blocked, reviewer info in PR
comment
- **Approved**: green checkmark, clickable, shows who approved
- **Merge queue**: green checkmark, auto-approved (unchanged)
## Test plan
- [x] All 20 tests in `maintainer-approval.test.js` pass
- [ ] Verify on a subsequent PR (after merge) that `maintainer-approval`
shows yellow "Expected" without approval, then turns green after
approval
Note: the workflow uses `pull_request_target`, so it runs from main.
This PR cannot test itself.1 parent 2b2cf62 commit 7b69412
2 files changed
Lines changed: 19 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
520 | 523 | | |
521 | 524 | | |
522 | 525 | | |
| |||
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
534 | | - | |
| 537 | + | |
535 | 538 | | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
| 539 | + | |
| 540 | + | |
543 | 541 | | |
544 | 542 | | |
545 | 543 | | |
546 | 544 | | |
547 | | - | |
548 | 545 | | |
549 | | - | |
| 546 | + | |
| 547 | + | |
550 | 548 | | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | 549 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
| 550 | + | |
564 | 551 | | |
565 | 552 | | |
566 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
| 254 | + | |
| 255 | + | |
257 | 256 | | |
258 | 257 | | |
259 | | - | |
| 258 | + | |
260 | 259 | | |
261 | 260 | | |
262 | 261 | | |
| |||
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
271 | | - | |
272 | | - | |
273 | | - | |
| 270 | + | |
274 | 271 | | |
275 | 272 | | |
276 | | - | |
| 273 | + | |
277 | 274 | | |
278 | 275 | | |
279 | 276 | | |
| |||
283 | 280 | | |
284 | 281 | | |
285 | 282 | | |
286 | | - | |
287 | | - | |
| 283 | + | |
288 | 284 | | |
289 | 285 | | |
290 | 286 | | |
| |||
317 | 313 | | |
318 | 314 | | |
319 | 315 | | |
320 | | - | |
321 | | - | |
| 316 | + | |
322 | 317 | | |
323 | 318 | | |
324 | 319 | | |
| |||
333 | 328 | | |
334 | 329 | | |
335 | 330 | | |
336 | | - | |
337 | | - | |
| 331 | + | |
338 | 332 | | |
339 | 333 | | |
340 | 334 | | |
| |||
349 | 343 | | |
350 | 344 | | |
351 | 345 | | |
352 | | - | |
353 | | - | |
| 346 | + | |
354 | 347 | | |
355 | 348 | | |
356 | 349 | | |
| |||
0 commit comments