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
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,18 @@ 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>

- **add_discussion_comment** - Add discussion comment
- **Required OAuth Scopes**: `repo`
- `body`: Comment content (string, required)
- `discussionNumber`: Discussion Number (number, required)
- `owner`: Repository owner (string, required)
- `replyToCommentNodeID`: The Node ID of the comment to reply to. If provided, the comment will be posted as a reply. (string, optional)
- `repo`: Repository name (string, required)

- **delete_discussion_comment** - Delete discussion comment
- **Required OAuth Scopes**: `repo`
- `commentNodeID`: The Node ID of the discussion comment to delete (string, required)

- **get_discussion** - Get discussion
- **Required OAuth Scopes**: `repo`
- `discussionNumber`: Discussion Number (number, required)
Expand All @@ -740,6 +752,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 All @@ -759,6 +772,16 @@ The following sets of tools are available:
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name. If not provided, discussions will be queried at the organisation level. (string, optional)

- **set_discussion_comment_answer** - Set discussion comment as answer
- **Required OAuth Scopes**: `repo`
- `commentNodeID`: The Node ID of the discussion comment to mark or unmark as the answer (string, required)
- `isAnswer`: Whether the comment is the answer to the discussion (true to mark, false to unmark) (boolean, required)

- **update_discussion_comment** - Update discussion comment
- **Required OAuth Scopes**: `repo`
- `body`: The new contents of the comment (string, required)
- `commentNodeID`: The Node ID of the discussion comment to update (string, required)

</details>

<details>
Expand Down
38 changes: 38 additions & 0 deletions pkg/github/__toolsnaps__/add_discussion_comment.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"annotations": {
"title": "Add discussion comment"
},
"description": "Add a comment to a discussion",
"inputSchema": {
"properties": {
"body": {
"description": "Comment content",
"type": "string"
},
"discussionNumber": {
"description": "Discussion Number",
"type": "number"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"replyToCommentNodeID": {
"description": "The Node ID of the comment to reply to. If provided, the comment will be posted as a reply.",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"discussionNumber",
"body"
],
"type": "object"
},
"name": "add_discussion_comment"
}
19 changes: 19 additions & 0 deletions pkg/github/__toolsnaps__/delete_discussion_comment.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"annotations": {
"title": "Delete discussion comment"
},
"description": "Delete a comment on a discussion",
"inputSchema": {
"properties": {
"commentNodeID": {
"description": "The Node ID of the discussion comment to delete",
"type": "string"
}
},
"required": [
"commentNodeID"
],
"type": "object"
},
"name": "delete_discussion_comment"
}
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
24 changes: 24 additions & 0 deletions pkg/github/__toolsnaps__/set_discussion_comment_answer.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"annotations": {
"title": "Set discussion comment as answer"
},
"description": "Marks or unmarks a given discussion comment as the answer to the discussion.",
"inputSchema": {
"properties": {
"commentNodeID": {
"description": "The Node ID of the discussion comment to mark or unmark as the answer",
"type": "string"
},
"isAnswer": {
"description": "Whether the comment is the answer to the discussion (true to mark, false to unmark)",
"type": "boolean"
}
},
"required": [
"commentNodeID",
"isAnswer"
],
"type": "object"
},
"name": "set_discussion_comment_answer"
}
24 changes: 24 additions & 0 deletions pkg/github/__toolsnaps__/update_discussion_comment.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"annotations": {
"title": "Update discussion comment"
},
"description": "Update a comment on a discussion",
"inputSchema": {
"properties": {
"body": {
"description": "The new contents of the comment",
"type": "string"
},
"commentNodeID": {
"description": "The Node ID of the discussion comment to update",
"type": "string"
}
},
"required": [
"commentNodeID",
"body"
],
"type": "object"
},
"name": "update_discussion_comment"
}
Loading
Loading