Create a review for a pull request
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
Pull request reviews created in the PENDING
state do not include the submitted_at
property in the response.
Note: To comment on a specific line in a file, you need to first determine the position of that line in the diff. The GitHub REST API v3 offers the application/vnd.github.v3.diff
media type. To see a pull request diff, add this media type to the Accept
header of a call to the single pull request endpoint.
The position
value equals the number of lines down from the first “@@” hunk header in the file you want to add a comment. The line just below the “@@” line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
Path Parameters
Body
application/json
Body
The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position
. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES
or COMMENT
for the event
parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE
, REQUEST_CHANGES
, or COMMENT
. By leaving this blank, you set the review action state to PENDING
, which means you will need to submit the pull request review when you are ready.
Allowed values:APPROVEREQUEST_CHANGESCOMMENT
Use the following table to specify the location, destination, and contents of the draft review comment.
Show Child Parameters
Response
application/json
Response
Response
Pull Request Review
Pull Request Reviews are reviews on pull requests.
Unique identifier of the review
Example:42
Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=
Simple User
Show Child Parameters
The text of the review.
Example:This looks great.
Example:CHANGES_REQUESTED
Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80
Example:https://api.github.com/repos/octocat/Hello-World/pulls/12
Show Child Parameters
A commit SHA for the review.
Example:54bb654c9e6025347f57900a4a5c2313a96b8035
How the author is associated with the repository.
Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
Example:OWNER
Path Parameters
Body
Get a review for a pull request
Path Parameters
review_id parameter
Response
application/json
Response
Response
Pull Request Review
Pull Request Reviews are reviews on pull requests.
Unique identifier of the review
Example:42
Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=
Simple User
Show Child Parameters
The text of the review.
Example:This looks great.
Example:CHANGES_REQUESTED
Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80
Example:https://api.github.com/repos/octocat/Hello-World/pulls/12
Show Child Parameters
A commit SHA for the review.
Example:54bb654c9e6025347f57900a4a5c2313a96b8035
How the author is associated with the repository.
Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
Example:OWNER
Path Parameters
Update a review for a pull request
Update the review summary comment with new text.
Path Parameters
review_id parameter
Body
application/json
Body
The body text of the pull request review.
Response
application/json
Response
Response
Pull Request Review
Pull Request Reviews are reviews on pull requests.
Unique identifier of the review
Example:42
Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=
Simple User
Show Child Parameters
The text of the review.
Example:This looks great.
Example:CHANGES_REQUESTED
Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80
Example:https://api.github.com/repos/octocat/Hello-World/pulls/12
Show Child Parameters
A commit SHA for the review.
Example:54bb654c9e6025347f57900a4a5c2313a96b8035
How the author is associated with the repository.
Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
Example:OWNER
Path Parameters
Body
Delete a pending review for a pull request
Path Parameters
review_id parameter
Response
application/json
Response
Response
Pull Request Review
Pull Request Reviews are reviews on pull requests.
Unique identifier of the review
Example:42
Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=
Simple User
Show Child Parameters
The text of the review.
Example:This looks great.
Example:CHANGES_REQUESTED
Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80
Example:https://api.github.com/repos/octocat/Hello-World/pulls/12
Show Child Parameters
A commit SHA for the review.
Example:54bb654c9e6025347f57900a4a5c2313a96b8035
How the author is associated with the repository.
Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
Example:OWNER
Path Parameters
List comments for a pull request review
List comments for a specific pull request review.
Query Parameters
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
Path Parameters
review_id parameter
Response
application/json
Response
Response
Legacy Review Comment
Example:https://api.github.com/repos/octocat/Hello-World/pulls/comments/1
Example:42
Example:10
Example:MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw
Example:@@ -16,33 +16,40 @@ public class Connection : IConnection...
Example:file1.txt
Example:1
Example:4
Example:6dcb09b5b57875f334f61aebed695e2e4193db5e
Example:9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840
Example:8
Simple User
Show Child Parameters
Example:Great stuff
Example:2011-04-14T16:00:49Z
Example:2011-04-14T16:00:49Z
Example:https://github.com/octocat/Hello-World/pull/1#discussion-diff-1
Example:https://api.github.com/repos/octocat/Hello-World/pulls/1
How the author is associated with the repository.
Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
Example:OWNER
Show Child Parameters
Show Child Parameters
The side of the first line of the range for a multi-line comment.
Allowed values:LEFTRIGHT
Default:RIGHT
The side of the first line of the range for a multi-line comment.
Allowed values:LEFTRIGHT
Default:RIGHT
The line of the blob to which the comment applies. The last line of the range for a multi-line comment
Example:2
The original line of the blob to which the comment applies. The last line of the range for a multi-line comment
Example:2
The first line of the range for a multi-line comment.
Example:2
The original first line of the range for a multi-line comment.
Example:2