issue_comments
Creates, updates, deletes, gets or lists an issue_comments resource.
Overview
| Name | issue_comments |
| Type | Resource |
| Id | github.reactions.issue_comments |
Fields
The following fields are returned by SELECT queries:
- list_for_issue_comment
- list_for_issue
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
node_id | string | (example: MDg6UmVhY3Rpb24x) |
content | string | The reaction to use (+1, -1, laugh, confused, heart, hooray, rocket, eyes) (example: heart) |
created_at | string (date-time) | (example: 2016-05-20T20:09:31Z) |
user | object | A GitHub user. (title: Simple User) |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
node_id | string | (example: MDg6UmVhY3Rpb24x) |
content | string | The reaction to use (+1, -1, laugh, confused, heart, hooray, rocket, eyes) (example: heart) |
created_at | string (date-time) | (example: 2016-05-20T20:09:31Z) |
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_for_issue_comment | select | owner, repo, comment_id | content, per_page, page | List the reactions to an issue comment. |
list_for_issue | select | owner, repo, issue_number | content, per_page, page | List the reactions to an issue. |
create_for_issue_comment | insert | owner, repo, comment_id, content | Create a reaction to an issue comment. A response with an HTTP 200 status means that you already added the reaction type to this issue comment. | |
create_for_issue | insert | owner, repo, issue_number, content | Create a reaction to an issue. A response with an HTTP 200 status means that you already added the reaction type to this issue. | |
delete_for_issue_comment | delete | owner, repo, comment_id, reaction_id | > [!NOTE] > You can also specify a repository by repository_id using the route DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id.Delete a reaction to an issue comment. | |
delete_for_issue | delete | owner, repo, issue_number, reaction_id | > [!NOTE] > You can also specify a repository by repository_id using the route DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id.Delete a reaction to an issue. |
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. |
issue_number | integer | The number that identifies the issue. |
owner | string | The account owner of the repository. The name is not case sensitive. |
reaction_id | integer | The unique identifier of the reaction. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
content | string | Returns a single reaction type. Omit this parameter to list all reactions to an issue. |
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_for_issue_comment
- list_for_issue
List the reactions to an issue comment.
SELECT
id,
node_id,
content,
created_at,
user
FROM github.reactions.issue_comments
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND comment_id = '{{ comment_id }}' -- required
AND content = '{{ content }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
List the reactions to an issue.
SELECT
id,
node_id,
content,
created_at,
user
FROM github.reactions.issue_comments
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND issue_number = '{{ issue_number }}' -- required
AND content = '{{ content }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- create_for_issue_comment
- create_for_issue
- Manifest
Create a reaction to an issue comment. A response with an HTTP 200 status means that you already added the reaction type to this issue comment.
INSERT INTO github.reactions.issue_comments (
content,
owner,
repo,
comment_id
)
SELECT
'{{ content }}' /* required */,
'{{ owner }}',
'{{ repo }}',
'{{ comment_id }}'
RETURNING
id,
node_id,
content,
created_at,
user
;
Create a reaction to an issue. A response with an HTTP 200 status means that you already added the reaction type to this issue.
INSERT INTO github.reactions.issue_comments (
content,
owner,
repo,
issue_number
)
SELECT
'{{ content }}' /* required */,
'{{ owner }}',
'{{ repo }}',
'{{ issue_number }}'
RETURNING
id,
node_id,
content,
created_at,
user
;
# Description fields are for documentation purposes
- name: issue_comments
props:
- name: owner
value: "{{ owner }}"
description: Required parameter for the issue_comments resource.
- name: repo
value: "{{ repo }}"
description: Required parameter for the issue_comments resource.
- name: comment_id
value: "{{ comment_id }}"
description: Required parameter for the issue_comments resource.
- name: issue_number
value: {{ issue_number }}
description: Required parameter for the issue_comments resource.
- name: content
value: "{{ content }}"
description: |
The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue.
valid_values: ['+1', '-1', 'laugh', 'confused', 'heart', 'hooray', 'rocket', 'eyes']
DELETE examples
- delete_for_issue_comment
- delete_for_issue
> [!NOTE]
> You can also specify a repository by repository_id using the route DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id.
Delete a reaction to an issue comment.
DELETE FROM github.reactions.issue_comments
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND comment_id = '{{ comment_id }}' --required
AND reaction_id = '{{ reaction_id }}' --required
;
> [!NOTE]
> You can also specify a repository by repository_id using the route DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id.
Delete a reaction to an issue.
DELETE FROM github.reactions.issue_comments
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND issue_number = '{{ issue_number }}' --required
AND reaction_id = '{{ reaction_id }}' --required
;