Skip to main content

comments

Overview

Namecomments
TypeResource
Idgithub.pulls.comments

Fields

NameDatatypeDescription
idintegerThe ID of the pull request review comment.
positionintegerThe line index in the diff to which the comment applies.
start_sidestringThe side of the first line of the range for a multi-line comment.
pull_request_urlstringURL for the pull request that the review comment belongs to.
author_associationstringHow the author is associated with the repository.
sidestringThe side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment
_linksobject
diff_hunkstringThe diff of the line that the comment refers to.
created_atstring
pathstringThe relative path of the file to which the comment applies.
body_textstring
lineintegerThe line of the blob to which the comment applies. The last line of the range for a multi-line comment
original_positionintegerThe index of the original line in the diff to which the comment applies.
html_urlstringHTML URL for the pull request review comment.
pull_request_review_idintegerThe ID of the pull request review to which the comment belongs.
original_lineintegerThe line of the blob to which the comment applies. The last line of the range for a multi-line comment
userobjectSimple User
reactionsobject
original_start_lineintegerThe first line of the range for a multi-line comment.
original_commit_idstringThe SHA of the original commit to which the comment applies.
bodystringThe text of the comment.
start_lineintegerThe first line of the range for a multi-line comment.
commit_idstringThe SHA of the commit to which the comment applies.
in_reply_to_idintegerThe comment ID to reply to.
updated_atstring
node_idstringThe node ID of the pull request review comment.
body_htmlstring
urlstringURL for the pull request review comment

Methods

NameAccessible byRequired ParamsDescription
get_review_commentSELECTcomment_id, owner, repoProvides details for a review comment.
list_review_commentsSELECTowner, pull_number, repoLists all review comments for a pull request. By default, review comments are in ascending order by ID.
list_review_comments_for_repoSELECTowner, repoLists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
create_reply_for_review_commentINSERTcomment_id, owner, pull_number, repo, data__bodyCreates a reply to a review comment for a pull request. For the comment_id, provide the ID of the review comment you are replying to. This must be the ID of a top-level review comment, not a reply to that comment. Replies to replies are not supported.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
create_review_commentINSERTowner, pull_number, repo, data__body
Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "Create an issue comment." We recommend creating a review comment using line, side, and optionally start_line and start_side if your comment applies to more than one line in the pull request diff.

You can still create a review comment using the position parameter. When you use position, the line, side, start_line, and start_side parameters are not required.

Note: The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
delete_review_commentDELETEcomment_id, owner, repoDeletes a review comment.
update_review_commentEXECcomment_id, owner, repo, data__bodyEnables you to edit a review comment.