Commit 47b67d5
Per-user reviewer attempts + @-mention fallback + widen toolhive docs paths (#776)
* @-mention non-collaborator release contributors; widen toolhive docs paths
Two independent but related improvements to the upstream-release-docs
pipeline:
1. Reviewer routing: @-mention contributors we can't auto-assign
The existing reviewer-extract step batched all non-bot release
commit authors and filtered to docs-website collaborators. On
PR #759 that filter silently dropped four of five candidates
(`reyortiz3`, `ChrisJBurns`, `jhroz`, `tgrunnag` are all upstream
toolhive contributors but not collaborators on docs-website).
The filter is mandatory because `gh pr edit --add-reviewer`
returns 422 for any non-collaborator in the list, dropping the
valid reviewers alongside the invalid ones.
Now split the candidates:
- ASSIGN_LIST (collaborators): batch-assigned as reviewers
via `--add-reviewer`. Unchanged behavior.
- MENTION_LIST (everyone else): @-mentioned in a new
"Release contributors" section of the PR body so they see
the PR documenting their work even though we can't request
their review via the API.
Detecting Stacklok employees directly (e.g. via the `stackers`
team) requires a PAT with read:org scope -- `GITHUB_TOKEN`
doesn't have it, and public-org-membership checks only see
members with public membership. Deferred; noted in a comment.
2. Expand toolhive docs_paths hints
The `toolhive` upstream is a monorepo shipping the CLI, the
Kubernetes operator, and the vMCP gateway, plus cross-cutting
features that land in concepts/, integrations/, tutorials/,
and hand-written reference pages. The previous hints listed
only the three guides-* folders. In practice the skill's
Phase 3 impact map expanded beyond the hints (PR #759 touched
concepts/, integrations/, tutorials/), so this is a focus
improvement rather than a bug fix -- more accurate hints let
Phase 2's source reading home in on the right areas without
re-scanning unrelated docs.
Other projects' hints are already accurate for their scope.
toolhive-cloud-ui intentionally keeps docs_paths: [] -- no
associated docs in this repo yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Assign reviewers per-user instead of pre-filtering by collaborator API
Replaces the upfront `gh api repos/X/collaborators/Y` filter with
per-user `gh pr edit --add-reviewer` attempts. Routes GitHub's own
rejection (422) into the mention list instead of relying on our
filter to pre-compute the split.
Why: on PR #759 the collaborator check returned 404 for Stacklok
employees who ARE collaborators via the `stackers` team (push
permission on docs-website) -- `ChrisJBurns`, `jhrozek`, `reyortiz3`,
`tgrunnagle`. Only `rdimitrov` passed, so four reviewers silently
vanished. A local check with a PAT that has read:org confirms all
five are collaborators; the discrepancy appears to be GITHUB_TOKEN
treating team-based access differently at the collaborator endpoint,
though we haven't pinned the exact rule.
The authoritative answer is "will GitHub accept this person as a
reviewer right now" -- asking that question directly (via the
add-reviewer API) avoids the filter being wrong. Each attempt is
independent, so one rejection doesn't kill the batch.
The separate "Add reviewers" step is now redundant -- assignments
happen inline during candidate iteration. Dropped.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a661dc0 commit 47b67d5
2 files changed
Lines changed: 80 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
43 | 54 | | |
44 | 55 | | |
45 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 412 | + | |
418 | 413 | | |
419 | 414 | | |
420 | 415 | | |
421 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
422 | 437 | | |
423 | 438 | | |
424 | | - | |
425 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
426 | 452 | | |
427 | 453 | | |
428 | 454 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
434 | 470 | | |
435 | 471 | | |
436 | 472 | | |
| |||
797 | 833 | | |
798 | 834 | | |
799 | 835 | | |
| 836 | + | |
| 837 | + | |
800 | 838 | | |
801 | 839 | | |
802 | 840 | | |
| |||
830 | 868 | | |
831 | 869 | | |
832 | 870 | | |
833 | | - | |
| 871 | + | |
834 | 872 | | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
835 | 887 | | |
836 | 888 | | |
837 | 889 | | |
| |||
855 | 907 | | |
856 | 908 | | |
857 | 909 | | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | 910 | | |
866 | 911 | | |
867 | 912 | | |
| |||
0 commit comments