GitHub Discussion
Manage discussions in carlos-algms/agentic.nvim via GraphQL API.
IDs Reference
Repository ID: R_kgDOQXqKiw
Categories
| Category | ID |
|---|---|
| Announcements | DIC_kwDOQXqKi84C1alq |
| General | DIC_kwDOQXqKi84C1alr |
| Ideas | DIC_kwDOQXqKi84C1alt |
| Polls | DIC_kwDOQXqKi84C1alv |
| Q&A | DIC_kwDOQXqKi84C1als |
| Research | DIC_kwDOQXqKi84C1alw |
| Show and tell | DIC_kwDOQXqKi84C1alu |
Labels
| Label | ID |
|---|---|
| bug | LA_kwDOQXqKi88AAAACQBotaQ |
| documentation | LA_kwDOQXqKi88AAAACQBoteg |
| duplicate | LA_kwDOQXqKi88AAAACQBotgw |
| enhancement | LA_kwDOQXqKi88AAAACQBotkQ |
| good first issue | LA_kwDOQXqKi88AAAACQBotpA |
| help wanted | LA_kwDOQXqKi88AAAACQBotnA |
| invalid | LA_kwDOQXqKi88AAAACQBotqA |
| not-acp-standard | LA_kwDOQXqKi88AAAACQBottw |
| question | LA_kwDOQXqKi88AAAACQBotrw |
| quality-of-life | LA_kwDOQXqKi88AAAACVMzaQA |
Usage
Default category: Research
Override: /github-discussion Ideas or /github-discussion Q&A
Create Discussion
bash
gh api graphql -f query='
mutation {
createDiscussion(input: {
repositoryId: "R_kgDOQXqKiw",
categoryId: "DIC_kwDOQXqKi84C1alw",
title: "TITLE",
body: "BODY"
}) {
discussion {
id
url
}
}
}'
List Discussions
bash
gh api graphql -f query='
{
repository(owner: "carlos-algms", name: "agentic.nvim") {
discussions(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) {
nodes {
id
number
title
url
category { name }
labels(first: 5) { nodes { name } }
}
}
}
}'
Filter by category:
bash
gh api graphql -f query='
{
repository(owner: "carlos-algms", name: "agentic.nvim") {
discussions(first: 10, categoryId: "DIC_kwDOQXqKi84C1alw") {
nodes { number title url }
}
}
}'
Add Labels to Discussion
Requires discussion ID (starts with D_):
bash
gh api graphql -f query='
mutation {
addLabelsToLabelable(input: {
labelableId: "D_kwDOQXqKi84...",
labelIds: ["LA_kwDOQXqKi88AAAACQBotkQ"]
}) {
labelable {
... on Discussion { title }
}
}
}'
Remove Labels
bash
gh api graphql -f query='
mutation {
removeLabelsFromLabelable(input: {
labelableId: "D_kwDOQXqKi84...",
labelIds: ["LA_kwDOQXqKi88AAAACQBotkQ"]
}) {
labelable {
... on Discussion { title }
}
}
}'
Critical Notes
- •Escape quotes in body: use
\"for literal quotes - •No native command:
gh discussiondoesn't exist - •Repo owner:
carlos-algms(notcarlos.gomes) - •Return the discussion URL when done