Request pull request reviews
The GitHub Request pull request reviews action helps you route code changes to the right people by requesting reviewers on an existing pull request. Use this action when you want an agent or workflow to ask specific users or teams to review a pull request, such as requesting documentation review on docs related pull requests.
This action updates an existing pull request by requesting one or more users or teams as reviewers. It operates only on existing pull requests and it does not create new ones. It sends the request through GitHub using your authenticated configuration.
Limitations
-
Available only for GitHub Cloud repositories connected through the GitHub connector and GitHub Server and GitHub Enterprise Server are not supported.
-
Subject to GitHub API rate limits, for example, the default rate limit of 4 queries per second and any additional limits configured by your admin.
Prerequisites
-
GitHub is connected as a datasource in Glean and the Glean app for GitHub is installed in your GitHub organization.
-
GitHub action pack are enabled in the Glean admin console for your organization.
-
You are authenticated to use GitHub actions so the action can run using your GitHub identity.
Supported parameters
| Parameter | Description |
|---|---|
| owner | Owner of the repository that contains the pull request. |
| repo | Name of the repository that contains the pull request. |
| pull_number | Number of the pull request to request reviews on. |
| reviewers | Users to request as reviewers for the pull request. |
| team_reviewers | Teams to request as reviewers for the pull request. |
Usage examples
Minimal
Request a single engineer to review a pull request when you already know the owner, repository, and pull request number.
Typical
Use in a documentation workflow agent to request review from the documentation team on any pull request that updates docs content.
Advanced
Combine with other GitHub actions such as Get a pull request and Create a review comment for a pull request to build an agent that analyzes pull request changes, leaves comments, and then requests the right reviewers.
Troubleshooting
-
Error: Action fails for a specific pull request.
- Possible cause: The
owner,repo, orpull_numbervalues do not match an existing pull request that is available through your GitHub connector - Fix: Confirm that the repository is connected in Glean, the pull request exists in GitHub, and the identifiers you passed match the pull request.
- Possible cause: The
-
Error: Action succeeds intermittently or stops working after many rapid calls.
- Possible cause: Hitting GitHub API rate limits.
- Fix: Reduce how frequently the action is called, or stagger calls across time. If this keeps happening, contact your Glean admin to review configuration and usage.
-
Error: Action appears unavailable or you see an authentication or permission error.
- Possible cause: GitHub actions are not enabled for your organization, you have not authenticated for GitHub actions, or your GitHub identity does not have permission to request reviewers for the target repository.
- Fix: Ask your Glean admin to confirm that the GitHub actions pack is added and that you are allowed to use it, then re-authenticate for GitHub and try again.
FAQs
-
Does this action create a new pull request?
→ No. This action only requests reviewers for an existing pull request. Use other GitHub actions if you need to create a pull request.
-
What systems does this action work with?
→ This action works with GitHub Cloud repositories that are connected through the GitHub connector in Glean.
-
Who runs this action in GitHub?
→ The action runs using the identity that authenticated for GitHub actions. Make sure that identity has permission to request reviewers on the target repository and pull request.