feat: add remove_issue_reaction, remove_issue_comment_reaction and remove_pull_request_review_comment_reaction tools to the granular issues and pull requests toolsets - #3285
Merged
Conversation
Add granular tools for removing reactions from issues, issue comments, and pull request review comments, with destructive annotations, tests, snapshots, and generated documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132
remove_issue_reaction, remove_issue_comment_reaction and remove_pull_request_review_comment_reaction tools to the granular issues and pull requests toolsets
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
All three handlers leak response bodies when GitHub returns API errors.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds granular MCP tools to remove reactions from issues, comments, and pull request review comments.
Changes:
- Registers three destructive reaction-removal tools.
- Adds DELETE handlers, tests, and schema snapshots.
- Updates generated feature-flag documentation.
| File | Description |
|---|---|
pkg/github/tools.go |
Registers the new tools. |
pkg/github/issues_granular.go |
Implements issue and comment removal. |
pkg/github/pullrequests_granular.go |
Implements review-comment removal. |
pkg/github/helper_test.go |
Adds mock DELETE endpoints. |
pkg/github/granular_tools_test.go |
Tests registration and handlers. |
pkg/github/__toolsnaps__/remove_issue_reaction.snap |
Snapshots issue tool schema. |
pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap |
Snapshots comment tool schema. |
pkg/github/__toolsnaps__/remove_pull_request_review_comment_reaction.snap |
Snapshots review-comment schema. |
docs/feature-flags.md |
Documents the new tools. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Register nil-safe response body cleanup before handling go-github errors for all reaction removal tools, and cover every API-error path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132
RossTarrant
approved these changes
Sep 16, 2026
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
Adds granular MCP tools for removing reactions from issues or pull requests, issue or pull request comments, and pull request review comments.
Why
The granular toolsets can add reactions but previously had no matching way to remove them, leaving agents unable to undo an accidental or outdated reaction.
What changed
remove_issue_reactionandremove_issue_comment_reactionto the granular issues toolset.remove_pull_request_review_comment_reactionto the granular pull requests toolset.MCP impact
Each new tool mirrors its add-reaction counterpart and accepts the target identifier plus the
reaction_idreturned when a reaction is created.Prompts tested (tool changes only)
Security / limits
The tools retain the same
reposcope and granular feature gating as their add counterparts. They are explicitly marked destructive because they delete reactions; GitHub enforces ownership and repository permissions.Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testDocs