Skip to main content

issue_comments

Creates, updates, deletes, gets or lists an issue_comments resource.

Overview

Nameissue_comments
TypeResource
Idgithub.reactions.issue_comments

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idinteger
node_idstring (example: MDg6UmVhY3Rpb24x)
contentstringThe reaction to use (+1, -1, laugh, confused, heart, hooray, rocket, eyes) (example: heart)
created_atstring (date-time) (example: 2016-05-20T20:09:31Z)
userobjectA GitHub user. (title: Simple User)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_for_issue_commentselectowner, repo, comment_idcontent, per_page, pageList the reactions to an issue comment.
list_for_issueselectowner, repo, issue_numbercontent, per_page, pageList the reactions to an issue.
create_for_issue_commentinsertowner, repo, comment_id, contentCreate 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_issueinsertowner, repo, issue_number, contentCreate 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_commentdeleteowner, 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_issuedeleteowner, 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.

NameDatatypeDescription
comment_idinteger (int64)The unique identifier of the comment.
issue_numberintegerThe number that identifies the issue.
ownerstringThe account owner of the repository. The name is not case sensitive.
reaction_idintegerThe unique identifier of the reaction.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
contentstringReturns a single reaction type. Omit this parameter to list all reactions to an issue.
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

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

INSERT examples

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
;

DELETE examples

> [!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
;