Commit 564490a
Filter reviewers to repo collaborators only
Previous behavior pulled every non-bot commit author from the upstream
release range and passed them to `gh pr edit --add-reviewer` as a
single comma-separated list. GitHub rejects reviewer requests for
non-collaborators with 422, and because the API treats the list
atomically, one community contributor in the range would fail the
entire call and drop all valid reviewers with it.
Fix:
- Probe each candidate with `gh api repos/<repo>/collaborators/<user>`
before adding. 204 -> keep; 404 -> skip.
- Emit a separate `skipped` output listing non-collaborator
contributors so the PR body can acknowledge them by name
("Other release contributors ... Thanks for the contribution!")
without actually requesting review from them.
Pre-existing bot-regex filter runs first so we don't waste API calls
on [bot] users.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a68f13e commit 564490a
1 file changed
Lines changed: 39 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
370 | 371 | | |
371 | | - | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | 375 | | |
379 | 376 | | |
380 | | - | |
| 377 | + | |
381 | 378 | | |
382 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
383 | 406 | | |
| 407 | + | |
384 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
385 | 412 | | |
386 | 413 | | |
387 | 414 | | |
| |||
570 | 597 | | |
571 | 598 | | |
572 | 599 | | |
| 600 | + | |
573 | 601 | | |
574 | 602 | | |
575 | 603 | | |
| |||
603 | 631 | | |
604 | 632 | | |
605 | 633 | | |
606 | | - | |
| 634 | + | |
607 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
608 | 640 | | |
609 | 641 | | |
610 | 642 | | |
| |||
0 commit comments