Skip to main content

reviews

Overview

Namereviews
TypeResource
Idgithub.pulls.reviews

Fields

NameDatatypeDescription
idintegerUnique identifier of the review
bodystringThe text of the review.
body_textstring
userobjectA GitHub user.
body_htmlstring
submitted_atstring
commit_idstringA commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be null.
html_urlstring
statestring
author_associationstringHow the author is associated with the repository.
_linksobject
node_idstring
pull_request_urlstring

Methods

NameAccessible byRequired ParamsDescription
get_reviewSELECTowner, pull_number, repo, review_idRetrieves a pull request review by its ID.
list_reviewsSELECTowner, pull_number, repoThe list of reviews returns in chronological order.
create_reviewINSERTowner, pull_number, repoThis 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 are not submitted and therefore do not include the submitted_at property in the response. To create a pending review for a pull request, leave the event parameter blank. For more information about submitting a PENDING review, see "Submit a review for a pull request."

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 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.
delete_pending_reviewDELETEowner, pull_number, repo, review_idDeletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.
dismiss_reviewEXECowner, pull_number, repo, review_id, data__messageNote: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
submit_reviewEXECowner, pull_number, repo, review_id, data__eventSubmits a pending review for a pull request. For more information about creating a pending review for a pull request, see "Create a review for a pull request."
update_reviewEXECowner, pull_number, repo, review_id, data__bodyUpdate the review summary comment with new text.