comments
Creates, updates, deletes, gets or lists a comments resource.
Overview
| Name | comments |
| Type | Resource |
| Id | github.pulls.comments |
Fields
The following fields are returned by SELECT queries:
- get_review_comment
- list_review_comments
- list_review_comments_for_repo
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | The ID of the pull request review comment. |
commit_id | string | The SHA of the commit to which the comment applies. (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e) |
in_reply_to_id | integer | The comment ID to reply to. |
node_id | string | The node ID of the pull request review comment. (example: MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw) |
original_commit_id | string | The SHA of the original commit to which the comment applies. (example: 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840) |
pull_request_review_id | integer (int64) | The ID of the pull request review to which the comment belongs. |
_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 | The text of the comment. (example: We should probably include a check for null values here.) |
body_html | string | (example: " comment body ") |
body_text | string | (example: "comment body") |
created_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
diff_hunk | string | The diff of the line that the comment refers to. (example: @@ -16,33 +16,40 @@ public class Connection : IConnection...) |
html_url | string (uri) | HTML URL for the pull request review comment. (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 line of the blob to which the comment applies. The last line of the range for a multi-line comment |
original_position | integer | The index of the original line in the diff to which the comment applies. This field is closing down; use original_line instead. |
original_start_line | integer | The first line of the range for a multi-line comment. |
path | string | The relative path of the file to which the comment applies. (example: config/database.yaml) |
position | integer | The line index in the diff to which the comment applies. This field is closing down; use line instead. |
pull_request_url | string (uri) | URL for the pull request that the review comment belongs to. (example: https://api.github.com/repos/octocat/Hello-World/pulls/1) |
reactions | object | (title: Reaction Rollup) |
side | string | The side of the diff to which the comment applies. The side of the last 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 | URL for the pull request review comment (example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1) |
user | object | A GitHub user. (title: Simple User) |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | The ID of the pull request review comment. |
commit_id | string | The SHA of the commit to which the comment applies. (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e) |
in_reply_to_id | integer | The comment ID to reply to. |
node_id | string | The node ID of the pull request review comment. (example: MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw) |
original_commit_id | string | The SHA of the original commit to which the comment applies. (example: 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840) |
pull_request_review_id | integer (int64) | The ID of the pull request review to which the comment belongs. |
_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 | The text of the comment. (example: We should probably include a check for null values here.) |
body_html | string | (example: " comment body ") |
body_text | string | (example: "comment body") |
created_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
diff_hunk | string | The diff of the line that the comment refers to. (example: @@ -16,33 +16,40 @@ public class Connection : IConnection...) |
html_url | string (uri) | HTML URL for the pull request review comment. (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 line of the blob to which the comment applies. The last line of the range for a multi-line comment |
original_position | integer | The index of the original line in the diff to which the comment applies. This field is closing down; use original_line instead. |
original_start_line | integer | The first line of the range for a multi-line comment. |
path | string | The relative path of the file to which the comment applies. (example: config/database.yaml) |
position | integer | The line index in the diff to which the comment applies. This field is closing down; use line instead. |
pull_request_url | string (uri) | URL for the pull request that the review comment belongs to. (example: https://api.github.com/repos/octocat/Hello-World/pulls/1) |
reactions | object | (title: Reaction Rollup) |
side | string | The side of the diff to which the comment applies. The side of the last 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 | URL for the pull request review comment (example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1) |
user | object | A GitHub user. (title: Simple User) |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | The ID of the pull request review comment. |
commit_id | string | The SHA of the commit to which the comment applies. (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e) |
in_reply_to_id | integer | The comment ID to reply to. |
node_id | string | The node ID of the pull request review comment. (example: MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw) |
original_commit_id | string | The SHA of the original commit to which the comment applies. (example: 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840) |
pull_request_review_id | integer (int64) | The ID of the pull request review to which the comment belongs. |
_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 | The text of the comment. (example: We should probably include a check for null values here.) |
body_html | string | (example: " comment body ") |
body_text | string | (example: "comment body") |
created_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
diff_hunk | string | The diff of the line that the comment refers to. (example: @@ -16,33 +16,40 @@ public class Connection : IConnection...) |
html_url | string (uri) | HTML URL for the pull request review comment. (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 line of the blob to which the comment applies. The last line of the range for a multi-line comment |
original_position | integer | The index of the original line in the diff to which the comment applies. This field is closing down; use original_line instead. |
original_start_line | integer | The first line of the range for a multi-line comment. |
path | string | The relative path of the file to which the comment applies. (example: config/database.yaml) |
position | integer | The line index in the diff to which the comment applies. This field is closing down; use line instead. |
pull_request_url | string (uri) | URL for the pull request that the review comment belongs to. (example: https://api.github.com/repos/octocat/Hello-World/pulls/1) |
reactions | object | (title: Reaction Rollup) |
side | string | The side of the diff to which the comment applies. The side of the last 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 | URL for the pull request review comment (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 |
|---|---|---|---|---|
get_review_comment | select | owner, repo, comment_id | Provides details for a specified review comment. 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. | |
list_review_comments | select | owner, repo, pull_number | sort, direction, since, per_page, page | Lists all review comments for a specified pull request. By default, review comments are in ascending order by ID. 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. |
list_review_comments_for_repo | select | owner, repo | sort, direction, since, per_page, page | Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. 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. |
create_reply_for_review_comment | insert | owner, repo, pull_number, comment_id, body | Creates 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. For more information, see "Rate limits for the API" and "Best practices for using the REST API." 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. | |
create_review_comment | insert | owner, repo, pull_number, body, commit_id, path | Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "Create an issue comment." If your comment applies to more than one line in the pull request diff, you should use the parameters line, side, and optionally start_line and start_side in your request.The position parameter is closing down. If you use position, the line, side, start_line, and start_side parameters are not required.This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API." 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. | |
update_review_comment | update | owner, repo, comment_id, body | Edits the content of a specified review comment. 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. | |
delete_review_comment | delete | owner, repo, comment_id | Deletes a review comment. |
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 |
|---|---|---|
comment_id | integer (int64) | The unique identifier of the comment. |
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. |
direction | string | The direction to sort results. Ignored without sort parameter. |
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." |
since | string (date-time) | Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
sort | string |
SELECT examples
- get_review_comment
- list_review_comments
- list_review_comments_for_repo
Provides details for a specified review comment.
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
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND comment_id = '{{ comment_id }}' -- required
;
Lists all review comments for a specified pull request. By default, review comments
are in ascending order by ID.
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
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND pull_number = '{{ pull_number }}' -- required
AND sort = '{{ sort }}'
AND direction = '{{ direction }}'
AND since = '{{ since }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
Lists review comments for all pull requests in a repository. By default,
review comments are in ascending order by ID.
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
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND sort = '{{ sort }}'
AND direction = '{{ direction }}'
AND since = '{{ since }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- create_reply_for_review_comment
- create_review_comment
- Manifest
Creates 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. For more information, see "Rate limits for the API"
and "Best practices for using the REST API."
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.
INSERT INTO github.pulls.comments (
body,
owner,
repo,
pull_number,
comment_id
)
SELECT
'{{ body }}' /* required */,
'{{ owner }}',
'{{ repo }}',
'{{ pull_number }}',
'{{ comment_id }}'
RETURNING
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
;
Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "Create an issue comment."
If your comment applies to more than one line in the pull request diff, you should use the parameters line, side, and optionally start_line and start_side in your request.
The position parameter is closing down. If you use position, the line, side, start_line, and start_side parameters are not required.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API"
and "Best practices for using the REST API."
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.
INSERT INTO github.pulls.comments (
body,
commit_id,
path,
position,
side,
line,
start_line,
start_side,
in_reply_to,
subject_type,
owner,
repo,
pull_number
)
SELECT
'{{ body }}' /* required */,
'{{ commit_id }}' /* required */,
'{{ path }}' /* required */,
{{ position }},
'{{ side }}',
{{ line }},
{{ start_line }},
'{{ start_side }}',
{{ in_reply_to }},
'{{ subject_type }}',
'{{ owner }}',
'{{ repo }}',
'{{ pull_number }}'
RETURNING
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
;
# Description fields are for documentation purposes
- name: comments
props:
- name: owner
value: "{{ owner }}"
description: Required parameter for the comments resource.
- name: repo
value: "{{ repo }}"
description: Required parameter for the comments resource.
- name: pull_number
value: {{ pull_number }}
description: Required parameter for the comments resource.
- name: comment_id
value: "{{ comment_id }}"
description: Required parameter for the comments resource.
- name: body
value: "{{ body }}"
description: |
The text of the review comment.
- name: commit_id
value: "{{ commit_id }}"
description: |
The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`.
- name: path
value: "{{ path }}"
description: |
The relative path to the file that necessitates a comment.
- name: position
value: {{ position }}
description: |
**This parameter is closing down. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. 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.
- name: side
value: "{{ side }}"
description: |
In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation.
valid_values: ['LEFT', 'RIGHT']
- name: line
value: {{ line }}
description: |
**Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.
- name: start_line
value: {{ start_line }}
description: |
**Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation.
- name: start_side
value: "{{ start_side }}"
description: |
**Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context.
valid_values: ['LEFT', 'RIGHT', 'side']
- name: in_reply_to
value: {{ in_reply_to }}
description: |
The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored.
- name: subject_type
value: "{{ subject_type }}"
description: |
The level at which the comment is targeted.
valid_values: ['line', 'file']
UPDATE examples
- update_review_comment
Edits the content of a specified review comment.
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.
UPDATE github.pulls.comments
SET
body = '{{ body }}'
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND comment_id = '{{ comment_id }}' --required
AND body = '{{ body }}' --required
RETURNING
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;
DELETE examples
- delete_review_comment
Deletes a review comment.
DELETE FROM github.pulls.comments
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND comment_id = '{{ comment_id }}' --required
;