GitHub v3 REST API

Get a review for a pull request

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Response

application/json

Response

Pull Request Review

Pull Request Reviews are reviews on pull requests.

idintegerrequired

Unique identifier of the review

Example:42

node_idstringrequired

Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The text of the review.

Example:This looks great.

statestringrequired

Example:CHANGES_REQUESTED

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/12

_linksobjectrequired
Show Child Parameters
submitted_atstring(date-time)
commit_idstringrequired

A commit SHA for the review.

Example:54bb654c9e6025347f57900a4a5c2313a96b8035

body_htmlstring
body_textstring
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

get/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
 
application/json

Update a review for a pull request

Update the review summary comment with new text.

put
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Body

application/json
bodystringrequired

The body text of the pull request review.

Response

application/json

Response

Pull Request Review

Pull Request Reviews are reviews on pull requests.

idintegerrequired

Unique identifier of the review

Example:42

node_idstringrequired

Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The text of the review.

Example:This looks great.

statestringrequired

Example:CHANGES_REQUESTED

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/12

_linksobjectrequired
Show Child Parameters
submitted_atstring(date-time)
commit_idstringrequired

A commit SHA for the review.

Example:54bb654c9e6025347f57900a4a5c2313a96b8035

body_htmlstring
body_textstring
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

put/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}

Body

{ "body": "This is close to perfect! Please address the suggested inline change. And add more about this." }
 
application/json

Delete a pending review for a pull request

delete
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Response

application/json

Response

Pull Request Review

Pull Request Reviews are reviews on pull requests.

idintegerrequired

Unique identifier of the review

Example:42

node_idstringrequired

Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The text of the review.

Example:This looks great.

statestringrequired

Example:CHANGES_REQUESTED

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/12

_linksobjectrequired
Show Child Parameters
submitted_atstring(date-time)
commit_idstringrequired

A commit SHA for the review.

Example:54bb654c9e6025347f57900a4a5c2313a96b8035

body_htmlstring
body_textstring
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

delete/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
 
application/json

List comments for a pull request review

List comments for a specific pull request review.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Response

application/json

Response

Legacy Review Comment

urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/comments/1

pull_request_review_idinteger | nullrequired

Example:42

idintegerrequired

Example:10

node_idstringrequired

Example:MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw

diff_hunkstringrequired

Example:@@ -16,33 +16,40 @@ public class Connection : IConnection...

pathstringrequired

Example:file1.txt

positioninteger | nullrequired

Example:1

original_positionintegerrequired

Example:4

commit_idstringrequired

Example:6dcb09b5b57875f334f61aebed695e2e4193db5e

original_commit_idstringrequired

Example:9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840

in_reply_to_idinteger

Example:8

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

Example:Great stuff

created_atstring(date-time)required

Example:2011-04-14T16:00:49Z

updated_atstring(date-time)required

Example:2011-04-14T16:00:49Z

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1#discussion-diff-1

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1

author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

_linksobjectrequired
Show Child Parameters
body_textstring
body_htmlstring
reactionsobject
Show Child Parameters
sidestring

The side of the first line of the range for a multi-line comment.

Allowed values:LEFTRIGHT

Default:RIGHT

start_sidestring | null

The side of the first line of the range for a multi-line comment.

Allowed values:LEFTRIGHT

Default:RIGHT

lineinteger

The line of the blob to which the comment applies. The last line of the range for a multi-line comment

Example:2

original_lineinteger

The original line of the blob to which the comment applies. The last line of the range for a multi-line comment

Example:2

start_lineinteger | null

The first line of the range for a multi-line comment.

Example:2

original_start_lineinteger | null

The original first line of the range for a multi-line comment.

Example:2

get/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
 
application/json

Dismiss a review for a pull request

Note: 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.

put
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Body

application/json
messagestringrequired

The message for the pull request review dismissal

eventstring

Example:"APPROVE"

Response

application/json

Response

Pull Request Review

Pull Request Reviews are reviews on pull requests.

idintegerrequired

Unique identifier of the review

Example:42

node_idstringrequired

Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The text of the review.

Example:This looks great.

statestringrequired

Example:CHANGES_REQUESTED

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/12

_linksobjectrequired
Show Child Parameters
submitted_atstring(date-time)
commit_idstringrequired

A commit SHA for the review.

Example:54bb654c9e6025347f57900a4a5c2313a96b8035

body_htmlstring
body_textstring
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

put/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals

Body

{ "message": "message" }
 
application/json