Add update_pull_request_comment and delete_pull_request_comment tools
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định công cụ add_reply_to_pull_request_comment hiện có và mẫu yêu cầu API GitHub của công cụ đó. Thêm các công cụ cập nhật và xóa tương ứng bằng cách sử dụng các endpoint REST và tham số đã nêu, sau đó xác minh rằng mỗi công cụ đều nhắm đến bình luận của người dùng đã xác thực như mô tả và hỗ trợ body được yêu cầu cho việc cập nhật.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/github-mcp-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/github-mcp-server#3235 ·
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
github/github-mcp-server#3042 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/github-mcp-server#2803 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2740 ·
Tất cả issue của github/github-mcp-server
Issue tương tự
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
kind/bug status/0-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
🤔 refinement needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
equinor/radix-operator#1979 ·