Add update_pull_request_comment and delete_pull_request_comment tools
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
Rechercherichtung
Beginne damit, das vorhandene add_reply_to_pull_request_comment-Tool und sein GitHub-API-Anfragemuster zu lokalisieren. Füge entsprechende Tools zum Aktualisieren und Löschen hinzu, indem du die angegebenen REST-Endpunkte und Parameter verwendest, und überprüfe anschließend, dass jedes Tool wie beschrieben auf den Kommentar des authentifizierten Benutzers zielt und den angeforderten Body für Aktualisierungen unterstützt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 33.1k
- Forks
- 5k
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 25
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/github-mcp-server
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/github-mcp-server#3235 ·
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
github/github-mcp-server#3042 · 2 Kommentare ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/github-mcp-server#3032 · 1 Reaktion ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
github/github-mcp-server#2803 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
github/github-mcp-server#2740 ·
Alle Issues in github/github-mcp-server
Ähnliche Issues
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
kind/bug status/0-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
🤔 refinement needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
equinor/radix-operator#1979 ·