Note: Multi-line comments on pull requests are currently in public beta and subject to change.
Note: Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+json
Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact GitHub Support or GitHub Premium Support.
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
| Name | Type | Description |
|---|---|---|
sort |
string |
Can be either created or updated comments. Default: created
|
direction |
string |
Can be either asc or desc. Ignored without sort parameter. |
since |
string |
This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only returns comments updated at or after this time. |
Status: 200 OK
Link: <https://api.github.com/resource?page=2>; rel="next",
<https://api.github.com/resource?page=5>; rel="last"
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 10,
"node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
"pull_request_review_id": 42,
"diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
"path": "file1.txt",
"position": 1,
"original_position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
"in_reply_to_id": 8,
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Great stuff!",
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
"pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
"author_association": "NONE",
"_links": {
"self": {
"href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
}
},
"start_line": 1,
"original_start_line": 1,
"start_side": "RIGHT",
"line": 2,
"original_line": 2,
"side": "RIGHT"
}
]
Note: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
Use the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.Note: An additional reactions object in the review comment payload is currently available for developers to preview.
During the preview period, the APIs may change without advance notice.
Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
{
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1/reactions"
}