Skip to main content

List review comments in a repository

Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.

GET/repos/{owner}/{repo}/pulls/comments
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required
Query Parameters
sort string
optional
direction string
optional

Can be either `asc` or `desc`. Ignored without `sort` parameter.

since string<date-time>
optional

Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.

per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

Responses

application/json array[Pull Request Review Comment object]

Response

Headers
Link string
Example:
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
items Pull Request Review Comment object

Pull Request Review Comments are comments on a portion of the Pull Request's diff.

_links object
required
html object
required
href string<uri>
required

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

pull_request object
required
href string<uri>
required

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

self object
required
href string<uri>
required

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

author_association
string< author_association >
required

How the author is associated with the repository.

Example: OWNER

body string
required

The text of the comment.

Example: We should probably include a check for null values here.

body_html string
optional

Example: "<p>comment body</p>"

body_text string
optional

Example: "comment body"

commit_id string
required

The SHA of the commit to which the comment applies.

Example: 6dcb09b5b57875f334f61aebed695e2e4193db5e

created_at string<date-time>
required

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

diff_hunk string
required

The diff of the line that the comment refers to.

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

html_url string<uri>
required

HTML URL for the pull request review comment.

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

id integer
required

The ID of the pull request review comment.

Example: 1

in_reply_to_id integer
optional

The comment ID to reply to.

Example: 8

line integer
optional

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

Example: 2

node_id string
required

The node ID of the pull request review comment.

Example: MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw

original_commit_id string
required

The SHA of the original commit to which the comment applies.

Example: 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840

original_line integer
optional

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

Example: 2

original_position integer
required

The index of the original line in the diff to which the comment applies.

Example: 4

original_start_line integer
optionalnullable

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

Example: 2

path string
required

The relative path of the file to which the comment applies.

Example: config/database.yaml

position integer
required

The line index in the diff to which the comment applies.

Example: 1

pull_request_review_id integer
requirednullable

The ID of the pull request review to which the comment belongs.

Example: 42

pull_request_url string<uri>
required

URL for the pull request that the review comment belongs to.

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

reactions Reaction Rollup object
optional
+1 integer
required
-1 integer
required
confused integer
required
eyes integer
required
heart integer
required
hooray integer
required
laugh integer
required
rocket integer
required
total_count integer
required
url string<uri>
required
side string
optional

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

start_line integer
optionalnullable

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

Example: 2

start_side string
optionalnullable

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

updated_at string<date-time>
required

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

url string
required

URL for the pull request review comment

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

user Simple User object
required

Simple User

avatar_url string<uri>
required

Example: https://github.com/images/error/octocat_happy.gif

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

Example: https://api.github.com/users/octocat/orgs

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

Example: "2020-07-09T00:17:55Z"

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat