fix: support team pull request reviewers#2514
Merged
SamMorrowDrums merged 1 commit intoMay 31, 2026
Merged
Conversation
1cfcca3 to
cf48de0
Compare
pachecocordovamoiseseduardo-byte
approved these changes
May 23, 2026
cf48de0 to
8159f88
Compare
SamMorrowDrums
approved these changes
May 31, 2026
Collaborator
SamMorrowDrums
left a comment
There was a problem hiding this comment.
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 issuesgo test ./pkg/github -run 'Test_UpdatePullRequest|TestGranularRequestPullRequestReviewers' -count=1— passscript/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--reviewersyntax)
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!
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.
Summary
reviewersto includeORG/team-slugentries for pull request review requeststeam_reviewersrequest field while keeping ordinary usernames inreviewersupdate_pull_requesttool and the granularrequest_pull_request_reviewerstoolTo verify
go test ./pkg/github -run 'Test_UpdatePullRequest|TestGranularRequestPullRequestReviewers'go test ./pkg/githubgit diff --checkFixes #2440