Skip to content

fix(issues): validate add_issue_comment input modes - #3085

Open
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums-fix-add-issue-comment-schema
Open

fix(issues): validate add_issue_comment input modes#3085
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums-fix-add-issue-comment-schema

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

  • model add_issue_comment as requiring at least one of body or reaction without making either top-level required
  • require positive integer comment_id values to be paired with a valid reaction and reject comment bodies in existing-comment reaction calls
  • preserve body-only comments, issue/pull request reactions, and combined comment-plus-issue-reaction behavior
  • add focused schema and handler regression coverage and refresh the tool snapshot/docs

Validation

  • UPDATE_TOOLSNAPS=true go test ./...
  • script/generate-docs
  • script/lint
  • script/test

Fixes #3048

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 17, 2026 13:22
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code owner August 17, 2026 13:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes #3048 by aligning add_issue_comment schema validation with its supported input modes.

Changes:

  • Makes body and reaction conditionally 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_issue_comment: comment_id/reaction marked required but must be omitted for new comments — valid calls fail

2 participants