You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(github): teams with access show in the reviewer picker - #35126
Fresh from current main, replacing #31150, which was closed for conflicts.
Problem
On GitHub, the pull request reviewer picker can't find a team. Typing a team name such as frontend shows "Nobody with access matches that.", so a team can only be asked for a review on GitHub itself. The picker lists assignableUsers (people only), plus teams already requested on the pull request, so those requests can be taken back.
Change
listReviewerCandidates (GitHub)
ReviewerCandidates # people + already requested reviewers
+ ReviewerTeams # organization teams, in parallel, same `query`+ keep teams whose repositories include owner/name+ on any failure: no teams, people still listed
merge: requested → teams → people
ReviewerTeams reads organization(login: owner).teams. It needs read:org, and a GraphQL query GitHub refuses fails whole. That's why teams were left out of ReviewerCandidates. They stay in their own query and are dropped on failure (a token without read:org, or a repository owned by a user).
GitHub refuses a review request to a team without access to the repository, so each team's repositories(query: name) is checked for the exact owner/name. The REST list of a repository's teams needs admin (it returns 404 with repo + read:org as a non-admin), so it can't be used here.
An already requested team is listed once. More than 100 teams sets the existing truncated flag, which turns the host search on.
No client or contract change: web and mobile already render kind: "team" candidates, and requests already send team_reviewers.
Scope and approval
A small, focused fix for an obvious bug, with no prior issue. The capability is half there already: the candidate contract has kind: "team", both pickers render team rows, the request payload sends team_reviewers, and the mobile picker says "Search people and teams with access to this repository." But the GitHub adapter never returns a team that hasn't been requested yet, so none of this can be reached. This PR changes only the GitHub reviewer candidate read. Other hosts are unchanged. #19375 made teams that were already requested show up.
Verification
Before
After
Manual check: local dev server on this branch against a real organization pull request. The picker lists the 9 teams with access to the repository before the people (the organization has 11; the 2 without access aren't offered). Typing frontend lists the frontend team, tagged "team". The before capture is from fix(github): teams with access show in the reviewer picker #31150's base, where the picker behaved the same for this case.
Live teams(first: 100, query: "front") on that organization returns the frontend team with the repository in its access list.
GitHubPullRequestApi.test.ts: teams with access appear between the requested reviewers and the people; an INSUFFICIENT_SCOPES refusal of the teams query still returns the people; a typed query is sent to both reads and keeps host-matched teams. All three fail on main.
gitHubPullRequestJson.test.ts: the access filter is case-insensitive and drops a loose query match (acme/web-legacy), a requested team appears once, and a teams next page sets truncated.
vp run check:changed: format, lint, knip, GraphQL codegen check, typecheck and tests pass.
Not checked: sending a team review request from the picker. It uses the existing team_reviewers path, and I didn't want to ping a real team.
Done with Claude Opus 5.5 in Claude Code, run through T3 Code.
Macroscope's review found this PR approvable — The reviewer picker now includes visible organization teams with access to the repository, while preserving people results if team lookup fails. This adds selectable reviewers without granting access or automatically sending review requests.
Notes:
No code objects were reviewed. Approvability was decided on eligibility alone.
No code changes detected at 62727f9. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 5e8aa97 and 62727f9.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
GitHub reviewer candidate lookup now includes eligible organization teams alongside assignable people. Team results are filtered by repository access, can match the search query, and contribute to pagination status. Team-query errors do not prevent people candidates from being returned.
Changes: GitHub reviewer team candidates
Layer / File(s)
Summary
Team query and result contract packages/source-control-github/src/server/pullRequestReads.graphql, packages/source-control-github/src/server/pullRequestReads.graphql.ts
Adds the ReviewerTeams query and its result schemas. Renames the schema for teams already requested as reviewers.
Team filtering and candidate merging packages/source-control-github/src/server/gitHubPullRequestJson.ts, packages/source-control-github/src/server/gitHubPullRequestJson.test.ts
Filters teams by repository access and merges eligible teams with people candidates. Search matching and truncation account for both candidate types.
sequenceDiagram
participant GitHubPullRequestApi
participant GitHubGraphQL
participant toReviewerTeams
participant toReviewerCandidates
GitHubPullRequestApi->>GitHubGraphQL: Run people and team queries
GitHubGraphQL-->>GitHubPullRequestApi: Return query results
GitHubPullRequestApi->>toReviewerTeams: Convert team results
toReviewerTeams-->>GitHubPullRequestApi: Return eligible teams
GitHubPullRequestApi->>toReviewerCandidates: Combine people and team candidates
Loading
Suggested reviewers:juliusmarminge, t3dotgg
Merge Risk: Minimal · previous review 5e8aa
Teams with repository access now appear in the GitHub reviewer picker, and people still appear if the team lookup fails. No concrete defect was found in the changed code. The only open item is the web test failure in CI, which the visible logs do not tie to this change; confirm it is unrelated before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(github): teams with access show in the reviewer picker" names the main change: the GitHub reviewer-candidate read now returns teams with repository access. It follows conventional commi…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections, with a conventional-style title and an agent attribution line. The Problem section explains the missing …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(github): teams with access show in the reviewer picker" names the main change: the GitHub reviewer-candidate read now returns teams with repository access. It follows conventional commit form and is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, with a conventional-style title and an agent attribution line. The Problem section explains the missing team results and the reproduction (typing frontend shows no match). The Change section explains the fix. The Scope section explains why no issue is linked and notes that the change is a small fix. The Verification section lists manual checks, focused tests, and what was not checked. The description is complete and specific. The only gap is that the Scope section gives no issue link, but it explains why none is needed, as the template allows.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
4215-4215: Minor · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Make the typed-search fixture match the query.
The mock returns team web for ReviewerTeams(query: "octo"), and this assertion expects acme/web. GitHub filters that query by team name and slug, so the real response would omit web. Use a team whose name or slug matches octo, or expect no team in this case. (docs.github.com)
As per coding guidelines, “Test behavior that can break.” As per path instructions, “Hold changed tests to the rules in docs/internals/testing.md.”
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
verified unchanged head 53e7afcf7dbecf5fa6893f5c584014dfdb3fb19a on a linux boat vm with real github credentials, playwright and /usr/bin/google-chrome.
reproduced on github/main at d6c1d17793: this pr's github reviewer picker returns "Nobody with access matches that." for ping-devs, although the live github team query confirms repository access.
stopped main's server before starting the exact pr head. added a real github-backed project through the app and completed a real codex gpt-6.1-sol turn on each version. no mocks, fixtures or demo data.
on the pr head, the same picker search returns pingdotgg/ping-devs, tagged "team". people search still returns maria-rcks; an unmatched search shows the empty state; closing and reopening the picker returns one team row.
checked the actual web-client websocket response and a typed search through the running server's github adapter:
pullRequests.reviewerCandidates
host=github.com repository=pingdotgg/t3code number=35126
Success: pingdotgg/ping-devs (team, isRequested=false), 8 people, truncated=false
same live RPC with query="ping"
Success: pingdotgg/ping-devs (team)
blacksmith checks passed: the two focused suites (186 tests), then vp run check:changed ee90bdc9405d8d4b8ff78ce2133ccb04844298ab against the pr merge base. the latter passed format, lint, knip, graphql generation, typechecks for 11 packages and 188 tests. github ci is also green. no code changes or pushes were needed.
before, on main:
after, on the exact pr head:
team, people, unmatched search, then team again; playback and seeking checked after upload:
Not verified
sending or removing a review request was not exercised because it would notify real reviewers and mutate the pr. native ios/android, electron, remote/relay/tunnel connections, tokens without read:org, user-owned repositories, already-requested-team deduplication and more-than-100-result pagination were not exercised in the running app. the existing focused tests cover the scope-error fallback and requested-team deduplication.
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
size:L100-499 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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.
Note
🤖 Written by Claude Opus 5.5 on behalf of Illia
Fresh from current
main, replacing #31150, which was closed for conflicts.Problem
On GitHub, the pull request reviewer picker can't find a team. Typing a team name such as
frontendshows "Nobody with access matches that.", so a team can only be asked for a review on GitHub itself. The picker listsassignableUsers(people only), plus teams already requested on the pull request, so those requests can be taken back.Change
ReviewerTeamsreadsorganization(login: owner).teams. It needsread:org, and a GraphQL query GitHub refuses fails whole. That's why teams were left out ofReviewerCandidates. They stay in their own query and are dropped on failure (a token withoutread:org, or a repository owned by a user).repositories(query: name)is checked for the exactowner/name. The REST list of a repository's teams needs admin (it returns 404 withrepo+read:orgas a non-admin), so it can't be used here.teams(query:), which GitHub matches on team name and slug, and host-matched teams are kept alongside host-matched people.truncatedflag, which turns the host search on.kind: "team"candidates, and requests already sendteam_reviewers.Scope and approval
A small, focused fix for an obvious bug, with no prior issue. The capability is half there already: the candidate contract has
kind: "team", both pickers render team rows, the request payload sendsteam_reviewers, and the mobile picker says "Search people and teams with access to this repository." But the GitHub adapter never returns a team that hasn't been requested yet, so none of this can be reached. This PR changes only the GitHub reviewer candidate read. Other hosts are unchanged. #19375 made teams that were already requested show up.Verification
frontendlists thefrontendteam, tagged "team". The before capture is from fix(github): teams with access show in the reviewer picker #31150's base, where the picker behaved the same for this case.teams(first: 100, query: "front")on that organization returns thefrontendteam with the repository in its access list.GitHubPullRequestApi.test.ts: teams with access appear between the requested reviewers and the people; anINSUFFICIENT_SCOPESrefusal of the teams query still returns the people; a typed query is sent to both reads and keeps host-matched teams. All three fail onmain.gitHubPullRequestJson.test.ts: the access filter is case-insensitive and drops a loosequerymatch (acme/web-legacy), a requested team appears once, and a teams next page setstruncated.vp run check:changed: format, lint, knip, GraphQL codegen check, typecheck and tests pass.team_reviewerspath, and I didn't want to ping a real team.Done with Claude Opus 5.5 in Claude Code, run through T3 Code.