GitHub v3 REST API

List comments for a pull request review

List comments for a specific pull request review.

get
http://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
http://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

Submit a review for a pull request

post
http://HOSTNAME/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Body

application/json
bodystring

The body text of the pull request review

eventstringrequired

The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.

Allowed values:APPROVEREQUEST_CHANGESCOMMENT

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

post/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events

Body

{ "event": "APPROVE" }
 
application/json

Update a pull request branch

Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.

put
http://HOSTNAME/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/update-branch

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Body

application/json
expected_head_shastring

The expected SHA of the pull request’s HEAD ref. This is the most recent commit on the pull request’s branch. If the expected SHA does not match the pull request’s HEAD, you will receive a 422 Unprocessable Entity status. You can use the “List commits” endpoint to find the most recent commit SHA. Default: SHA of the pull request’s current HEAD ref.

Response

application/json

Response

messagestring
urlstring
put/repos/{owner}/{repo}/pulls/{pull_number}/update-branch

Body

{ "expected_head_sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" }
 
application/json

Get rate limit status for the authenticated user

Note: Accessing this endpoint does not count against your REST API rate limit.

Note: The rate object is deprecated. If you’re writing new API client code or updating existing code, you should use the core object instead of the rate object. The core object contains the same information that is present in the rate object.

get
http://HOSTNAME/api/v3/rate_limit

Response

application/json

Response

Rate Limit Overview

Rate Limit Overview

resourcesobjectrequired
Show Child Parameters
rateobjectrequired
Show Child Parameters
get/rate_limit
 
application/json