Request reviewers on a PR with request_review
Request one or more reviewers, and/or teams, on an open pull request.
Prerequisites
Section titled “Prerequisites”github-pull-requestsinstalled.- An open pull request — this tool checks PR state before requesting and rejects a closed or merged target.
- Write access to the repository, and (for team reviewers) the requested team must have access to the repository.
-
Gather the usernames and/or team slugs to request.
-
Call
request_review:{"owner": "your-org","repo": "your-repo","pullNumber": 12,"reviewers": ["alice", "bob"],"teamReviewers": ["platform-team"]}Both
reviewersandteamReviewersare optional, but at least one should be supplied for the call to have any effect. -
Read the response:
{ users: string[], teams: string[] }— the reviewers and teams now requested.
Verify it worked
Section titled “Verify it worked”Call list_review_requests with the same owner/repo/pullNumber and
confirm the names appear in users/teams.
- If the PR is not open, the call fails with
stale_targetand reports whether the PR is merged or closed. - If a requested team lacks access to the repository, GitHub’s rejection
surfaces verbatim as a
github_api_error— it is not retried or pre-validated.