pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/github/github-mcp-server/commit/8a48d0749f8afbadaa66ef828fd424195fb7846f

tps://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> feat: Add tool for discussion comment write operations (#2427) · github/github-mcp-server@8a48d07 · GitHub
Skip to content

Commit 8a48d07

Browse files
RossTarrantCopilotkerobbi
authored
feat: Add tool for discussion comment write operations (#2427)
* Add discussion comment write operation tools Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address comments from Copilot review * Update includeReplies description to specify GitHub API maximum replies limit * Consolidate into single tool * add tests cases for checking param presence * Enhance validation on discussion comment operations * Enhance discussion_write tool description Co-authored-by: Roberto Nacu <kerobbi@github.com> * Remove redundant param Co-authored-by: Roberto Nacu <kerobbi@github.com> * Refactor tests * Fix failing build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Roberto Nacu <kerobbi@github.com>
1 parent 46d220f commit 8a48d07

7 files changed

Lines changed: 1497 additions & 38 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,23 @@ The following sets of tools are available:
730730

731731
<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>
732732

733+
- **discussion_comment_write** - Manage discussion comments
734+
- **Required OAuth Scopes**: `repo`
735+
- `body`: Comment content (required for 'add', 'reply', and 'update' methods) (string, optional)
736+
- `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)
737+
- `discussionNumber`: Discussion number (required for 'add' and 'reply' methods) (number, optional)
738+
- `method`: Write operation to perform on a discussion comment.
739+
Options are:
740+
- 'add' - adds a new top-level comment to a discussion.
741+
- 'reply' - replies to a top-level discussion comment (GitHub Discussions only support one level of nesting).
742+
- 'update' - updates an existing discussion comment.
743+
- 'delete' - deletes a discussion comment.
744+
- 'mark_answer' - marks a discussion comment as the answer (Q&A only).
745+
- 'unmark_answer' - unmarks a discussion comment as the answer (Q&A only).
746+
(string, required)
747+
- `owner`: Repository owner (required for 'add' and 'reply' methods) (string, optional)
748+
- `repo`: Repository name (required for 'add' and 'reply' methods) (string, optional)
749+
733750
- **get_discussion** - Get discussion
734751
- **Required OAuth Scopes**: `repo`
735752
- `discussionNumber`: Discussion Number (number, required)
@@ -740,6 +757,7 @@ The following sets of tools are available:
740757
- **Required OAuth Scopes**: `repo`
741758
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
742759
- `discussionNumber`: Discussion Number (number, required)
760+
- `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)
743761
- `owner`: Repository owner (string, required)
744762
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
745763
- `repo`: Repository name (string, required)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"annotations": {
3+
"destructiveHint": true,
4+
"title": "Manage discussion comments"
5+
},
6+
"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.",
7+
"inputSchema": {
8+
"properties": {
9+
"body": {
10+
"description": "Comment content (required for 'add', 'reply', and 'update' methods)",
11+
"type": "string"
12+
},
13+
"commentNodeID": {
14+
"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.",
15+
"type": "string"
16+
},
17+
"discussionNumber": {
18+
"description": "Discussion number (required for 'add' and 'reply' methods)",
19+
"type": "number"
20+
},
21+
"method": {
22+
"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 (Q\u0026A only).\n- 'unmark_answer' - unmarks a discussion comment as the answer (Q\u0026A only).\n",
23+
"enum": [
24+
"add",
25+
"reply",
26+
"update",
27+
"delete",
28+
"mark_answer",
29+
"unmark_answer"
30+
],
31+
"type": "string"
32+
},
33+
"owner": {
34+
"description": "Repository owner (required for 'add' and 'reply' methods)",
35+
"type": "string"
36+
},
37+
"repo": {
38+
"description": "Repository name (required for 'add' and 'reply' methods)",
39+
"type": "string"
40+
}
41+
},
42+
"required": [
43+
"method"
44+
],
45+
"type": "object"
46+
},
47+
"name": "discussion_comment_write"
48+
}

pkg/github/__toolsnaps__/get_discussion_comments.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"description": "Discussion Number",
1515
"type": "number"
1616
},
17+
"includeReplies": {
18+
"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.",
19+
"type": "boolean"
20+
},
1721
"owner": {
1822
"description": "Repository owner",
1923
"type": "string"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy