Review a GitHub pull request
github_pr_reviewPosts approve, request-changes, or comment reviews on GitHub pull requests, including line comments, with optional head SHA to prevent posting on outdated commits.
Instructions
Post a review on a pull request: approve to approve changes, request_changes to request revisions (body required), or comment for general feedback. Only an open pull request can be approved or have changes requested, and GitHub does not let an author approve their own pull request or request changes on it. Line comments can be attached: path and line in the new version (or side left for a removed line), and start_line for a multi-line range. Pass head_sha to ensure the review posts only on the commit that was reviewed; if new commits arrived, the call fails without posting. A pull request is 12, #12, owner/repo#12 or its URL; a bare number means the working tree's repository, or repo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | Yes | The pull request, as 12, #12, owner/repo#12 or its URL. | |
| body | No | The review text. Required for request_changes and for comment without line comments; optional for approve. | |
| repo | No | owner/name; defaults to the working tree's repository (its origin). Used for a bare number. | |
| event | Yes | The review action: approve, request_changes, or comment. | |
| comments | No | Optional array of up to 50 line comments. | |
| head_sha | No | Optional 40-character commit SHA the review was based on. Fails if new commits arrived. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | Yes | ||
| repo | Yes | ||
| review | Yes | ||
| foreign | Yes | ||
| comments | Yes | How many line comments were posted with the review. |