feat: Add update_issue_comment tool #1147
Open
+330
−0
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.
Summary
Implements issue #1083 by adding a new
update_issue_comment
tool to the GitHub MCP server, enabling users to modify existing issue comments programmatically.Changes Made
update_issue_comment
with full parameter validationEditComment
API endpointImplementation Details
Tool Parameters
comment_id
(string, required): Comment's unique identifierissue_number
(number, required): Target issue numberowner
(string, required): Repository ownerrepo
(string, required): Repository namebody
(string, required): New comment contentFeatures
✅ Parameter Validation: Validates all required parameters with meaningful error messages
✅ ID Parsing: Proper comment ID validation (must be positive integer)
✅ Content Validation: Prevents empty or whitespace-only comments
✅ Error Handling: Handles GitHub API errors (404, permissions, etc.)
✅ Existing Patterns: Follows codebase conventions and patterns
Files Modified
pkg/github/issues.go
: AddedUpdateIssueComment
function and helperpkg/github/issues_test.go
: Added comprehensive test suite (5 test cases)pkg/github/tools.go
: Registered tool in issues toolsetpkg/github/__toolsnaps__/update_issue_comment.snap
: Tool schema validationTest Results
Test plan
Fixes #1083
🤖 Generated with Claude Code