Add auto-merge support to pull request tools
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Start at the existing merge_pull_request tool and compare its pull request inputs with the GitHub GraphQL enablePullRequestAutoMerge mutation. Implement the proposed auto-merge operation with owner, repo, pullNumber, and mergeMethod handling; determine from the surrounding pull request tools whether disablePullRequestAutoMerge belongs in scope. Done means MCP clients can enable auto-merge without falling back to the gh CLI.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
[!Note]
Responses generated with Claude
Describe the feature or problem you'd like to solve
There is no MCP equivalent for enabling auto-merge on a pull request (gh pr merge --auto --squash). This is a common workflow step after CI passes and approvals are in place.
Currently the only way to enable auto-merge via MCP clients is to fall back to gh CLI, which breaks the MCP-first workflow pattern and causes permission prompt friction in tools like Claude Code.
Proposed solution
Add an enable_auto_merge method (or similar) to the pull request write tools. The GitHub GraphQL API exposes the enablePullRequestAutoMerge mutation:
mutation($pullRequestId: ID!, $mergeMethod: PullRequestMergeMethod!) {
enablePullRequestAutoMerge(input: {
pullRequestId: $pullRequestId
mergeMethod: $mergeMethod
}) {
pullRequest { autoMergeRequest { enabledAt mergeMethod } }
}
}
Parameters:
owner(required): Repository ownerrepo(required): Repository namepullNumber(required): PR numbermergeMethod(optional): MERGE, SQUASH, or REBASE (default to repo setting)
A corresponding disablePullRequestAutoMerge mutation exists and could be included.
Example prompts or workflows
- "Enable auto-merge on PR #123 with squash"
- "Once CI passes, auto-merge this PR"
- "Set up auto-merge for all my approved PRs"
Additional context
The existing merge_pull_request tool handles immediate merges, but auto-merge is a distinct operation — it queues the merge to happen automatically once all required status checks and approvals are satisfied. This is particularly useful in CI-heavy repos where PRs can't be merged until checks complete.
- Lingua principale
- Go
- Stelle
- 33.1k
- Fork
- 5k
- Merge medio
- 2g 1h
- PR unite (30g)
- 25
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/github-mcp-server
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/github-mcp-server#3235 ·
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
github/github-mcp-server#3042 · 2 commenti ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/github-mcp-server#3032 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/github-mcp-server#2803 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
github/github-mcp-server#2740 ·
Tutte le issue di github/github-mcp-server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NVIDIA/gpu-operator#2955 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Broadcast Documentation Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
kovidgoyal/kitty#10516 ·
-
CVE-2024-24786 CPE mismatch Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
cisagov/vulnrichment#337 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100