Skip to content

AssignReviewers: find the PR below by branch, not the head filter - #46

Merged
willson556 merged 1 commit into
mainfrom
assign-reviewers-fork-stacks
Oct 6, 2026
Merged

willson556 merged 1 commit into
mainfrom
assign-reviewers-fork-stacks

Conversation

@willson556

@willson556 willson556 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

AssignReviewers never inherited assignees down a stack in goldengate-bms2000-string. Mid-stack PRs there got a fresh pick instead: StaflSystems/goldengate-bms2000-string#126 got thebhef and gretl-silva-stafl, while #125 below it has nehalkpatel and mns4595.

Cause: to find the PR below, inheritedAssignees listed open PRs with the list endpoint's head: StaflSystems:<base branch> filter. goldengate is a GitHub fork of stafl-bms2000-template (the other BMS2000 repos were generated from the template instead). In goldengate that filter returns nothing for all 17 open PRs, while the same query in coit-tower finds the PR. ReviewSLA and PlanCITier don't use the head filter (PlanCITier walks up the stack with base), so only AssignReviewers was affected.

Fix: list the repo's open PRs once and walk down the stack by matching head.ref, leaving out PRs whose head is in another repo, so a fork's same-named branch isn't taken for the PR below. A run now costs one paginated list instead of one list call per stack level.

Tests:

  • New: a mid-stack PR in a forked repo inherits. It fails on the old code.
  • New: a fork PR with the same branch name isn't treated as the PR below.
  • node --test passes all 102 tests.

Already-assigned PRs aren't touched. goldengate#126 keeps its current assignees.

🤖 Generated with Claude Code

In a repo that is a fork of another repo in the same org, the list
endpoint's head: owner:branch filter finds nothing, so mid-stack PRs
never inherited their assignees and got a fresh pick instead.
goldengate-bms2000-string is a fork of stafl-bms2000-template; its #126
got different assignees from #125 below it. Match head branches across
the repo's open PRs instead, leaving out PRs from forks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@willson556
willson556 marked this pull request as ready for review October 6, 2026 21:54

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@staflsystemsci
staflsystemsci Bot requested review from a team, fcheein, gretl-silva-stafl, mament0, mns4595, mzhu48, nehalkpatel and thebhef and removed request for a team October 6, 2026 21:55
@staflsystemsci

staflsystemsci Bot commented Oct 6, 2026

Copy link
Copy Markdown

Review SLA

Assignee Owes Due
gretl-silva-stafl First response Wed Oct 7, 11:55 PT
nehalkpatel First response Wed Oct 7, 11:55 PT

Due times are in business hours, 10:00 to 17:00 Pacific: 4 h for a PR under 250 added lines, 7 h otherwise, and 4 h for a re-review. Mid-stack, an assignee owes a response on the lowest PR they haven't approved. Dashboard

@willson556
willson556 merged commit 02240ba into main Oct 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants