fix(issues): validate add_issue_comment input modes - #3085
Open
SamMorrowDrums wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes #3048 by aligning add_issue_comment schema validation with its supported input modes.
Changes:
- Makes
bodyandreactionconditionally required. - Validates comment IDs and reaction values.
- Adds regression tests and refreshes generated documentation.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents comment_id as an integer. |
pkg/github/issues.go |
Adds schema and runtime input validation. |
pkg/github/issues_test.go |
Covers valid and invalid input modes. |
pkg/github/__toolsnaps__/add_issue_comment.snap |
Updates the tool schema snapshot. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
add_issue_commentas requiring at least one ofbodyorreactionwithout making either top-level requiredcomment_idvalues to be paired with a valid reaction and reject comment bodies in existing-comment reaction callsValidation
UPDATE_TOOLSNAPS=true go test ./...script/generate-docsscript/lintscript/testFixes #3048