mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #283] [MERGED] feat(assign-reviewers): optional REVIEWER_SKIP_BASE_BRANCHES to skip stacked-PR lanes #285
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/283
Author: @mattmillerai
Created: 9/9/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @mattmillerai
Base:
main← Head:matt/skip-assign-on-stacked-prs📝 Commits (1)
42c8320feat(assign-reviewers): optional REVIEWER_SKIP_BASE_BRANCHES to skip stacked-PR lanes📊 Changes
3 files changed (+122 additions, -24 deletions)
View changed files
📝
.github/assign-reviewers/tests/assignment.test.cjs(+35 -0)📝
.github/workflows/assign-reviewers.yml(+62 -24)📝
docs/callers/assign-reviewers.md(+25 -0)📄 Description
ELI-5
Auto-assign currently puts a human on every PR. If you're building something as a stack of ten small PRs onto one integration branch, that's ten people pinged for reviews nobody plans to do there — the real review happens once, at the end, on the promotion PR. This adds a repo setting: list the branches you don't want routed (
stack/**) and PRs onto them get no assignee. Everything aimed atmainbehaves exactly as it does today.Why
A stacked-PR lane defers review to a single promotion PR by design. Routing an owner onto each child pages a human per commit for a review that isn't intended there, and that kind of noise is what gets an automation muted for the whole repo rather than tuned.
Existing options don't fit.
skip_labelworks per-PR and manually, so it means remembering to label every child.REVIEWER_AUTHOR_ALLOWLISTis author-scoped, which is the wrong axis — the same author wants routing on theirmainPRs and off on their stacked ones.What changed
vars.REVIEWER_SKIP_BASE_BRANCHES— whitespace-separated globs, matched against the PR's base ref. A match skips the PR with an informational log, never a failing check.Unset or empty keeps today's behaviour, so no existing caller changes until it sets the var — the same opt-in shape as
REVIEWER_AUTHOR_ALLOWLIST.Two deliberate differences from that var:
REVIEWER_AUTHOR_ALLOWLISTfails closed because getting it wrong there is the dangerous direction; here it's the reverse.skip_labelis per-PR and manual. Both remain — they're for different jobs, and the header and caller doc say which to reach for.The glob helper moves above the early-exit block so the check runs before any API call; a skipped PR now costs zero requests. Same function, unchanged semantics, and it's the one already used for the path rules:
**spans segments,*stays inside one, and a wildcard-free pattern is an exact match.How has this been tested?
node --test .github/assign-reviewers/tests/*.test.cjs— 68 pass, 0 fail (was 64; +4 new). The harness executes the shipped inline script rather than a copy, so these exercise the real thing.stack/router-queue-pocwithstack/**set is not routed; the same PR onto the default branch still is.releasematchesreleasebut notrelease/1.2orreleases;stack/*matchesstack/abut notstack/a/b;stack/** wip/**shows multiple patterns.actionlintclean on the reusable; YAML parses; the 64 pre-existing tests are untouched and still green, which is what covers the helper move.Residual
varsplumbing itself (vars.REVIEWER_SKIP_BASE_BRANCHESreachingenv) is verified only by reading the workflow, as with every other var here.assign-reviewers.ymlgained this.assign-prs-to-author.ymlis a separate workflow and may want the same knob; not assumed, not added.ASSIGN_REVIEWERS_CALLERSroster bump or by hand.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.