Add MCP tools for GitHub Stacked PRs (gh stack link / sync / view)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Comece revisando as ferramentas existentes create_pull_request e update_pull_request e, em seguida, compare o comportamento de encadeamento de bases delas com o das operações propostas get_stack e link_stack. Uma v1 mínima estará completa quando os agentes puderem ler uma stack nativa e criar ou atualizar uma a partir de uma lista ordenada de pull requests ou branches, com as camadas ordenadas e o trunk retornados.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the feature or problem you’d like to solve
Agents that manage stacked / dependent PRs (each PR’s base is the branch below it) can already create and re-base-point individual PRs via create_pull_request / update_pull_request, but they have no first-class way to:
- Discover or read a GitHub native stack (the stack object / annotations created by
gh stack link/gh stack submit) - Create or update that stack as a unit
- Cascade-rebase / sync the tower when trunk moves (
gh stack sync/gh stack rebase) - Merge bottom-up with stack-aware ordering
Today the only path to native stacks is the gh stack CLI extension (github/gh-stack), which many agent environments intentionally don’t expose (token stays on a host proxy; container gh is stubbed; agents talk to GitHub through this MCP).
Proposed solution
Add a small stack toolset (or extend pull_requests) that mirrors the operations agents already need from gh stack, without shelling out:
| Tool | Purpose |
|---|---|
list_stacks / get_stack |
Resolve a stack by number, PR number, or head branch; return ordered PRs + trunk |
link_stack |
Create/update a stack from an ordered list of PR numbers or branches (gh stack link) |
update_stack |
Reorder / reparent / drop layers |
sync_stack |
Cascade-rebase onto trunk + push with lease semantics (gh stack sync) — or return structured rebase instructions if server-side git is out of scope |
merge_stack |
Merge bottom-up, stopping on the first non-mergeable layer |
Minimum useful v1: read + link (get_stack, link_stack). Agents can already do Path-B base-chaining with update_pull_request(base=…); what’s missing is the native stack object and a single call that wires N PRs correctly.
Example
link_stack(
owner: "org",
repo: "app",
base: "develop", # trunk
pull_numbers: [7609, 7797, 7810, 7815, …] # bottom → top
)
→ { stack_number: 7928, prs: [...] }
get_stack(owner, repo, stack_number: 7928)
→ ordered layers with number, head, base, mergeable, reviewDecision
- Linguagem predominante
- Go
- Estrelas
- 33.1k
- Forks
- 5k
- Merge médio
- 2d 3h
- PRs com merge (30d)
- 18
Preparar o ambiente
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 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
github/github-mcp-server#3042 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/github-mcp-server#3032 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
github/github-mcp-server#2803 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
github/github-mcp-server#2740 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de github/github-mcp-server
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
volodya-lombrozo/aidy#333 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
rossoctl/context-guru#314 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
OwO-Network/DLX#236 · 1 comentário · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100