github / github/github-mcp-server

Add bulk/batch issue label operations

未关闭
#2,412 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
request ai review
主要语言
Go
星标
33k
派生
5k
平均合并
2 天 1 小时
30 天内合并 PR
52

描述

> [!Note]
> Responses generated with Claude

### Describe the feature or problem you'd like to solve

There is no way to add labels to multiple issues in a single MCP tool call. The current `issue_write` tool supports labeling one issue at a time, but common workflows require labeling dozens of issues matching a search query (e.g., "label all issues from milestone X as `priority/high`").

This forces MCP clients to either:
1. Make N sequential `issue_write` calls (slow, noisy)
2. Fall back to `gh` CLI with scripting (breaks MCP-first pattern)

### Proposed solution

Add a batch labeling capability — either as:

**Option A**: A new `batch_update_issues` tool that accepts a list of issue numbers and label operations:
```json
{
"owner": "org",
"repo": "repo",
"issue_numbers": [1, 2, 3, 4, 5],
"add_labels": ["priority/high"],
"remove_labels": ["needs-triage"]
}
```

**Option B**: Extend `issue_write` with a `batch` method that accepts multiple issue numbers.

### Example prompts or workflows

1. "Add the `stale` label to all issues that haven't been updated in 90 days"
2. "Label issues #10, #15, #20, #25 as `sprint-42`"
3. "Move all `needs-triage` issues to `triaged` after review"
4. "Add `breaking-change` label to all issues in the v3.0 milestone"

### Additional context

The GitHub REST API supports adding labels to individual issues via `POST /repos/{owner}/{repo}/issues/{issue_number}/labels`. A batch tool would simply iterate internally, but having it as a single MCP call reduces round-trips and permission prompts for MCP clients like Claude Code.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。