-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: Add edit_issue_comment tool #872
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
base: main
Are you sure you want to change the base?
Conversation
Implements the edit_issue_comment tool to allow editing existing issue comments via the GitHub API. This addresses the feature request in issue github#868. Changes: - Added EditIssueComment function in pkg/github/issues.go - Registered the new tool in pkg/github/tools.go - Added comprehensive tests for the new functionality - Updated README documentation with the new tool Fixes github#868 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Use ghErrors.NewGitHubAPIErrorResponse for consistent error handling - Remove redundant status code check after successful API call - Update test expectation to match new error format Addresses review comments from PR #2
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Change test expectation to verify the stable prefix 'failed to edit comment:' rather than checking for the HTTP method string. This makes the test less dependent on implementation details of the error wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
@@ -534,6 +534,12 @@ The following sets of tools are available (all are on by default): | |||
- `repo`: Repository name (string, required) | |||
- `title`: Issue title (string, required) | |||
|
|||
- **edit_issue_comment** - Edit issue comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small remark to keep the tool naming consistent: update_issue_comment
. There is no edit_*
tool.
Summary
edit_issue_comment
tool to allow editing existing issue comments via the GitHub APIChanges
EditIssueComment
function inpkg/github/issues.go
that uses the GitHub API's EditComment endpointpkg/github/tools.go
in the write tools sectionTest Plan
Fixes #868
🤖 Generated with Claude Code