Repository navigation
AssignReviewers: find the PR below by branch, not the head filter - #46
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 6, 2026 21:54
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
|
Review SLA
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 |
thebhef
approved these changes
Oct 6, 2026
nehalkpatel
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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,
inheritedAssigneeslisted open PRs with the list endpoint'shead: 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 theheadfilter (PlanCITier walks up the stack withbase), 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:
node --testpasses all 102 tests.Already-assigned PRs aren't touched. goldengate#126 keeps its current assignees.
🤖 Generated with Claude Code