Add granular `add_label_to_issue` / `remove_label_from_issue` 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
- 72/100
Hướng nghiên cứu
Bắt đầu trong pkg/github/issues_granular.go và so sánh các công cụ được đề xuất với pattern add_sub_issue và remove_sub_issue hiện có. Sử dụng các REST endpoint được liệt kê để thêm và xóa một label, sau đó xác minh rằng mỗi thao tác bảo toàn các label khác của issue và xử lý một issue và một label duy 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
There is currently no way to remove a single label from an issue without replacing the issue's entire label set. The only issue-label tool, update_issue_labels (pkg/github/issues_granular.go), states in its own description: "This replaces the current labels with the provided list."
To remove one label, a client must:
- Read all current labels on the issue
- Compute the full set minus the one to remove
- Send the complete remaining set back
If step 1 or 2 is incomplete or stale, labels are silently dropped. This read-modify-write pattern is error-prone for agents and adds round-trips.
Proposed solution
Add discrete, non-destructive tools backed by the existing REST endpoints:
add_label_to_issue→POST /repos/{owner}/{repo}/issues/{issue_number}/labelsremove_label_from_issue→DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}
These operate on a single label without touching the rest of the issue's labels.
Precedent in the codebase
Sub-issues already follow exactly this granular pattern with add_sub_issue and remove_sub_issue, rather than forcing a full-set replacement. Labels-on-issues would benefit from the same treatment.
Additional context
Related to #2412 (bulk/batch label operations). This proposal is the single-issue, single-label complement: #2412 covers operating across many issues at once, while this covers safely adding/removing one label on one issue without clobbering the others.
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 27
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ự
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenNSW/nsw-srilanka#497 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
kubernetes-sigs/prow#953 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
caddyserver/caddy#8046 ·