Skip to main content

comments_for_review

Creates, updates, deletes, gets or lists a comments_for_review resource.

Overview

Namecomments_for_review
TypeResource
Idgithub.pulls.comments_for_review

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idinteger (int64)
commit_idstring (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e)
in_reply_to_idinteger
node_idstring (example: MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw)
original_commit_idstring (example: 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840)
pull_request_review_idinteger (int64)
_linksobject
author_associationstringHow the author is associated with the repository. (COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER) (title: author_association, example: OWNER)
bodystring (example: Great stuff)
body_htmlstring
body_textstring
created_atstring (date-time) (example: 2011-04-14T16:00:49Z)
diff_hunkstring (example: @@ -16,33 +16,40 @@ public class Connection : IConnection...)
html_urlstring (uri) (example: https://github.com/octocat/Hello-World/pull/1#discussion-diff-1)
lineintegerThe line of the blob to which the comment applies. The last line of the range for a multi-line comment
original_lineintegerThe original line of the blob to which the comment applies. The last line of the range for a multi-line comment
original_positioninteger
original_start_lineintegerThe original first line of the range for a multi-line comment.
pathstring (example: file1.txt)
positioninteger
pull_request_urlstring (uri) (example: https://api.github.com/repos/octocat/Hello-World/pulls/1)
reactionsobject (title: Reaction Rollup)
sidestringThe side of the first line of the range for a multi-line comment. (LEFT, RIGHT) (default: RIGHT)
start_lineintegerThe first line of the range for a multi-line comment.
start_sidestringThe side of the first line of the range for a multi-line comment. (LEFT, RIGHT) (default: RIGHT)
subject_typestringThe level at which the comment is targeted, can be a diff line or a file. (line, file)
updated_atstring (date-time) (example: 2011-04-14T16:00:49Z)
urlstring (uri) (example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1)
userobjectA GitHub user. (title: Simple User)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_comments_for_reviewselectowner, repo, pull_number, review_idper_page, pageLists 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.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
pull_numberintegerThe number that identifies the pull request.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
review_idintegerThe unique identifier of the review.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

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 }}'
;