Skip to main content

discussion_comments

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

Overview

Namediscussion_comments
TypeResource
Idgithub.discussions.discussion_comments

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idstringThe GraphQL node ID of the comment.
authorobjectThe comment author (login).
bodystringThe comment body as Markdown.
created_atstring (date-time)
is_answerbooleanWhether this comment is the chosen answer.
is_minimizedboolean
minimized_reasonstring
published_atstring (date-time)
reactionsobjectReaction counts (total_count).
repliesobjectReply counts (total_count).
updated_atstring (date-time)
upvote_countinteger
urlstringThe HTML URL of the comment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectowner, repo, discussion_numberTop-level comments on a discussion, with reply counts. Backed by the GitHub GraphQL API (repository.discussion.comments).

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
discussion_numberintegerThe number that identifies the discussion.
ownerstringThe account owner of the repository.
repostringThe name of the repository.

SELECT examples

Top-level comments on a discussion, with reply counts. Backed by the GitHub GraphQL API (repository.discussion.comments).

SELECT
id,
author,
body,
created_at,
is_answer,
is_minimized,
minimized_reason,
published_at,
reactions,
replies,
updated_at,
upvote_count,
url
FROM github.discussions.discussion_comments
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND discussion_number = '{{ discussion_number }}' -- required
;