-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat: Add tool for discussion comment write operations #2427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6411325
Add discussion comment write operation tools
RossTarrant 192ca0b
Address comments from Copilot review
RossTarrant cbd22dd
Update includeReplies description to specify GitHub API maximum repli…
RossTarrant f2a9baf
Consolidate into single tool
RossTarrant b4aedb5
add tests cases for checking param presence
RossTarrant 6b6bc17
Enhance validation on discussion comment operations
RossTarrant a1e3b45
Enhance discussion_write tool description
RossTarrant 1a75379
Remove redundant param
RossTarrant 91b179b
Refactor tests
RossTarrant f5c918b
Merge branch 'rosstarrant/add-discussion-comment-write-ops' of github…
RossTarrant 0a37d35
Fix failing build
RossTarrant 4a488cc
Merge branch 'main' into rosstarrant/add-discussion-comment-write-ops
RossTarrant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
pkg/github/__toolsnaps__/set_discussion_comment_answer.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.