Add update_pull_request_comment and delete_pull_request_comment tools
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 68/100
Piste de recherche
Commencez par localiser l'outil add_reply_to_pull_request_comment existant et son modèle de requête vers l'API GitHub. Ajoutez des outils correspondants de mise à jour et de suppression en utilisant les endpoints REST et les paramètres indiqués, puis vérifiez que chacun cible le commentaire de l'utilisateur authentifié comme décrit et prend en charge le body demandé pour les mises à jour.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the feature or problem you'd like to solve
The MCP server provides add_reply_to_pull_request_comment for PR review comments, but there is no way to edit or delete an existing review comment. The only available mutation is adding a new reply underneath an existing comment.
When an agent needs to correct or retract a review comment it previously posted, the current workaround is to post a new reply — leaving the stale original visible and creating thread noise. The alternative is falling back to gh api with PATCH/DELETE on /repos/{owner}/{repo}/pulls/comments/{id}, bypassing the MCP server entirely.
Proposed solution
Add two new tools that map to the existing GitHub REST API endpoints:
update_pull_request_comment
- REST API:
PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} - Parameters:
owner,repo,comment_id(number),body(string — new body text) - Auth constraint: Can only update comments authored by the authenticated user
- Equivalent
ghcommand:gh api repos/{owner}/{repo}/pulls/comments/{id} -X PATCH -f body="..."
delete_pull_request_comment
- REST API:
DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id} - Parameters:
owner,repo,comment_id(number) - Auth constraint: Can only delete comments authored by the authenticated user
- Equivalent
ghcommand:gh api repos/{owner}/{repo}/pulls/comments/{id} -X DELETE
Both endpoints are already documented in the GitHub REST API and require no new upstream features.
Additional context
This gap caused a real-world problem: an agent posted review replies that should have been edits to the original comments. The discussion_r{N} URL identifier ≠ the API comment id (a separate but related confusion — see #2235 for a different comment-reading gap), and without an edit tool the agent defaulted to the only mutation available — add_reply — producing thread noise instead of correcting the original.
Having edit/delete tools also enables agents to clean up their own mistakes programmatically, which is important for production reliability.
- Langage dominant
- Go
- Étoiles
- 33.1k
- Forks
- 5k
- Merge moyen
- 2 j 1 h
- PR mergées (30 j)
- 25
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/github-mcp-server
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
github/github-mcp-server#3235 ·
-
enhancement
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
github/github-mcp-server#3042 · 2 commentaires ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
github/github-mcp-server#3032 · 1 réaction ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
github/github-mcp-server#2803 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
github/github-mcp-server#2740 ·
Toutes les issues de github/github-mcp-server
Issues similaires
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
kind/bug status/0-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
🤔 refinement needed
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
equinor/radix-operator#1979 ·