Add update_pull_request_comment and delete_pull_request_comment tools
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 68/100
Direção de pesquisa
Comece localizando a ferramenta existente add_reply_to_pull_request_comment e seu padrão de requisição à API do GitHub. Adicione ferramentas correspondentes para atualização e exclusão usando os endpoints REST e parâmetros indicados e, em seguida, verifique se cada uma tem como alvo o comentário do usuário autenticado conforme descrito e oferece suporte ao body solicitado para atualizações.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Go
- Estrelas
- 33.1k
- Forks
- 5k
- Merge médio
- 2d 1h
- PRs com merge (30d)
- 25
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/github-mcp-server
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
github/github-mcp-server#3235 ·
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
github/github-mcp-server#3042 · 2 comentários ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/github-mcp-server#3032 · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
github/github-mcp-server#2803 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
github/github-mcp-server#2740 ·
Todas as issues de github/github-mcp-server
Issues semelhantes
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
kind/bug status/0-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
🤔 refinement needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
equinor/radix-operator#1979 ·