discussion_categories
Creates, updates, deletes, gets or lists a discussion_categories resource.
Overview
| Name | discussion_categories |
| Type | Resource |
| Id | github.discussions.discussion_categories |
Fields
The following fields are returned by SELECT queries:
- list
Response
| Name | Datatype | Description |
|---|---|---|
id | string | The GraphQL node ID of the category. |
name | string | |
created_at | string (date-time) | |
description | string | |
emoji | string | The emoji shortcode for the category. |
is_answerable | boolean | Whether discussions in this category can be marked as answered. |
slug | string | |
updated_at | string (date-time) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | owner, repo | Discussion categories configured for a repository (for example Announcements, Q&A, Ideas). Backed by the GitHub GraphQL API (repository.discussionCategories). |
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 |
|---|---|---|
owner | string | The account owner of the repository. |
repo | string | The name of the repository. |
SELECT examples
- list
Discussion categories configured for a repository (for example Announcements, Q&A, Ideas). Backed by the GitHub GraphQL API (repository.discussionCategories).
SELECT
id,
name,
created_at,
description,
emoji,
is_answerable,
slug,
updated_at
FROM github.discussions.discussion_categories
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;