comments_for_review
Creates, updates, deletes, gets or lists a comments_for_review resource.
Overview
| Name | comments_for_review |
| Type | Resource |
| Id | github.pulls.comments_for_review |
Fields
The following fields are returned by SELECT queries:
- list_comments_for_review
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | |
commit_id | string | (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e) |
in_reply_to_id | integer | |
node_id | string | (example: MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw) |
original_commit_id | string | (example: 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840) |
pull_request_review_id | integer (int64) | |
_links | object | |
author_association | string | How the author is associated with the repository. (COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER) (title: author_association, example: OWNER) |
body | string | (example: Great stuff) |
body_html | string | |
body_text | string | |
created_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
diff_hunk | string | (example: @@ -16,33 +16,40 @@ public class Connection : IConnection...) |
html_url | string (uri) | (example: https://github.com/octocat/Hello-World/pull/1#discussion-diff-1) |
line | integer | The line of the blob to which the comment applies. The last line of the range for a multi-line comment |
original_line | integer | The original line of the blob to which the comment applies. The last line of the range for a multi-line comment |
original_position | integer | |
original_start_line | integer | The original first line of the range for a multi-line comment. |
path | string | (example: file1.txt) |
position | integer | |
pull_request_url | string (uri) | (example: https://api.github.com/repos/octocat/Hello-World/pulls/1) |
reactions | object | (title: Reaction Rollup) |
side | string | The side of the first line of the range for a multi-line comment. (LEFT, RIGHT) (default: RIGHT) |
start_line | integer | The first line of the range for a multi-line comment. |
start_side | string | The side of the first line of the range for a multi-line comment. (LEFT, RIGHT) (default: RIGHT) |
subject_type | string | The level at which the comment is targeted, can be a diff line or a file. (line, file) |
updated_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
url | string (uri) | (example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1) |
user | object | A GitHub user. (title: Simple User) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_comments_for_review | select | owner, repo, pull_number, review_id | per_page, page | Lists comments for a specific pull request review. This endpoint supports the following custom media types. For more information, see "Media types." - application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.- application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will include body_text.- application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.- application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
pull_number | integer | The number that identifies the pull request. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
review_id | integer | The unique identifier of the review. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_comments_for_review
Lists comments for a specific pull request review.
This endpoint supports the following custom media types. For more information, see "Media types."
- application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
- application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will include body_text.
- application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
- application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
SELECT
id,
commit_id,
in_reply_to_id,
node_id,
original_commit_id,
pull_request_review_id,
_links,
author_association,
body,
body_html,
body_text,
created_at,
diff_hunk,
html_url,
line,
original_line,
original_position,
original_start_line,
path,
position,
pull_request_url,
reactions,
side,
start_line,
start_side,
subject_type,
updated_at,
url,
user
FROM github.pulls.comments_for_review
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND pull_number = '{{ pull_number }}' -- required
AND review_id = '{{ review_id }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;