Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,23 @@ The following sets of tools are available:

<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/comment-discussion-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/comment-discussion-light.png"><img src="pkg/octicons/icons/comment-discussion-light.png" width="20" height="20" alt="comment-discussion"></picture> Discussions</summary>

- **discussion_comment_write** - Manage discussion comments
- **Required OAuth Scopes**: `repo`
- `body`: Comment content (required for 'add', 'reply', and 'update' methods) (string, optional)
- `commentNodeID`: The Node ID of the discussion comment (required for 'reply', 'update', 'delete', 'mark_answer', and 'unmark_answer' methods). For 'reply', this is the top-level comment to reply to; GitHub Discussions only support one level of nesting. (string, optional)
- `discussionNumber`: Discussion number (required for 'add' and 'reply' methods) (number, optional)
- `method`: Write operation to perform on a discussion comment.
Options are:
- 'add' - adds a new top-level comment to a discussion.
- 'reply' - replies to a top-level discussion comment (GitHub Discussions only support one level of nesting).
- 'update' - updates an existing discussion comment.
- 'delete' - deletes a discussion comment.
- 'mark_answer' - marks a discussion comment as the answer.
- 'unmark_answer' - unmarks a discussion comment as the answer.
(string, required)
- `owner`: Repository owner (required for 'add' and 'reply' methods) (string, optional)
- `repo`: Repository name (required for 'add' and 'reply' methods) (string, optional)

- **get_discussion** - Get discussion
- **Required OAuth Scopes**: `repo`
- `discussionNumber`: Discussion Number (number, required)
Expand All @@ -740,6 +757,7 @@ The following sets of tools are available:
- **Required OAuth Scopes**: `repo`
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
- `discussionNumber`: Discussion Number (number, required)
- `includeReplies`: When true, each top-level comment will include its replies nested within it (up to 100 replies per comment, which is the GitHub API maximum). Defaults to false. (boolean, optional)
- `owner`: Repository owner (string, required)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
Expand Down
47 changes: 47 additions & 0 deletions pkg/github/__toolsnaps__/discussion_comment_write.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"annotations": {
"title": "Manage discussion comments"
},
"description": "Write operations for discussion comments.\nSupports adding top-level comments, replying to existing comments, updating comment content, deleting comments, and marking or unmarking comments as the answer.",
"inputSchema": {
"properties": {
"body": {
"description": "Comment content (required for 'add', 'reply', and 'update' methods)",
"type": "string"
},
"commentNodeID": {
"description": "The Node ID of the discussion comment (required for 'reply', 'update', 'delete', 'mark_answer', and 'unmark_answer' methods). For 'reply', this is the top-level comment to reply to; GitHub Discussions only support one level of nesting.",
"type": "string"
},
"discussionNumber": {
"description": "Discussion number (required for 'add' and 'reply' methods)",
"type": "number"
},
"method": {
"description": "Write operation to perform on a discussion comment.\nOptions are:\n- 'add' - adds a new top-level comment to a discussion.\n- 'reply' - replies to a top-level discussion comment (GitHub Discussions only support one level of nesting).\n- 'update' - updates an existing discussion comment.\n- 'delete' - deletes a discussion comment.\n- 'mark_answer' - marks a discussion comment as the answer.\n- 'unmark_answer' - unmarks a discussion comment as the answer.\n",
"enum": [
"add",
"reply",
"update",
"delete",
"mark_answer",
"unmark_answer"
],
"type": "string"
},
"owner": {
"description": "Repository owner (required for 'add' and 'reply' methods)",
"type": "string"
},
"repo": {
"description": "Repository name (required for 'add' and 'reply' methods)",
"type": "string"
}
},
"required": [
"method"
],
"type": "object"
},
"name": "discussion_comment_write"
}
4 changes: 4 additions & 0 deletions pkg/github/__toolsnaps__/get_discussion_comments.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"description": "Discussion Number",
"type": "number"
},
"includeReplies": {
"description": "When true, each top-level comment will include its replies nested within it (up to 100 replies per comment, which is the GitHub API maximum). Defaults to false.",
"type": "boolean"
},
"owner": {
"description": "Repository owner",
"type": "string"
Expand Down
Loading
Loading