Add update_pull_request_comment and delete_pull_request_comment tools
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Inizia individuando lo strumento esistente add_reply_to_pull_request_comment e il relativo schema di richiesta all'API GitHub. Aggiungi strumenti corrispondenti per l'aggiornamento e l'eliminazione utilizzando gli endpoint REST e i parametri indicati, quindi verifica che ciascuno punti al commento dell'utente autenticato come descritto e supporti il body richiesto per gli aggiornamenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 33.1k
- Fork
- 5k
- Merge medio
- 2g 1h
- PR unite (30g)
- 25
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/github-mcp-server
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/github-mcp-server#3235 ·
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
github/github-mcp-server#3042 · 2 commenti ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/github-mcp-server#3032 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/github-mcp-server#2803 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
github/github-mcp-server#2740 ·
Tutte le issue di github/github-mcp-server
Issue simili
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
kind/bug status/0-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
🤔 refinement needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
equinor/radix-operator#1979 ·