Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add MCP tools for GitHub Stacked PRs (gh stack link / sync / view)

Abierto
#2,905 2 comentarios 10 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
api, backend

Línea de trabajo

Comienza revisando las herramientas existentes create_pull_request y update_pull_request; después, compara su comportamiento de encadenamiento de bases con el de las operaciones propuestas get_stack y link_stack. Una v1 mínima está completa cuando los agentes pueden leer un stack nativo y crear o actualizar uno a partir de una lista ordenada de pull requests o branches, devolviendo las capas ordenadas y el trunk.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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:

  1. Discover or read a GitHub native stack (the stack object / annotations created by gh stack link / gh stack submit)
  2. Create or update that stack as a unit
  3. Cascade-rebase / sync the tower when trunk moves (gh stack sync / gh stack rebase)
  4. 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
Lenguaje dominante
Go
Estrellas
33.1k
Forks
5k
Merge medio
2 d 1 h
PR fusionados (30 d)
25

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/github-mcp-server

Todos los issues de github/github-mcp-server

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.