Skip to content

fix: support team pull request reviewers#2514

Merged
SamMorrowDrums merged 1 commit into
github:mainfrom
he-yufeng:fix/pull-request-team-reviewers
May 31, 2026
Merged

fix: support team pull request reviewers#2514
SamMorrowDrums merged 1 commit into
github:mainfrom
he-yufeng:fix/pull-request-team-reviewers

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Summary

  • allow reviewers to include ORG/team-slug entries for pull request review requests
  • split team reviewer entries into GitHub's team_reviewers request field while keeping ordinary usernames in reviewers
  • apply the same behavior to the consolidated update_pull_request tool and the granular request_pull_request_reviewers tool
  • update the tool schema snapshot and README wording to document the accepted format

To verify

  • go test ./pkg/github -run 'Test_UpdatePullRequest|TestGranularRequestPullRequestReviewers'
  • go test ./pkg/github
  • git diff --check

Fixes #2440

@he-yufeng he-yufeng requested a review from a team as a code owner May 20, 2026 19:47
@he-yufeng he-yufeng force-pushed the fix/pull-request-team-reviewers branch from 1cfcca3 to cf48de0 Compare May 22, 2026 16:30
@SamMorrowDrums SamMorrowDrums force-pushed the fix/pull-request-team-reviewers branch from cf48de0 to 8159f88 Compare May 31, 2026 10:11
Copy link
Copy Markdown
Collaborator

@SamMorrowDrums SamMorrowDrums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely scoped fix. The splitPullRequestReviewers helper is the right shape, tests cover the user+team mixed case, and the schema descriptions are updated to match.

I rebased onto current main and validated locally:

  • script/lint — 0 issues
  • go test ./pkg/github -run 'Test_UpdatePullRequest|TestGranularRequestPullRequestReviewers' -count=1 — pass
  • script/test — pass

Edge cases I poked at all behave sensibly:

  • "user" → user reviewer ✅
  • "owner/team"team_reviewers=["team"]
  • "/team", "owner/", "a/b/c" → fall through to user reviewers (GitHub will reject; minor footgun but matches GH CLI's --reviewer syntax)

The org prefix is dropped at the API boundary; if the org doesn't match the repo's org, GitHub will return an error rather than us pre-validating — that's fine. Approving once CI is green.

Thanks @he-yufeng!

@SamMorrowDrums SamMorrowDrums merged commit 2bd162a into github:main May 31, 2026
13 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.

update_pull_request: reviewers field silently ignores team slugs

3 participants