Add MCP tools for GitHub Stacked PRs (gh stack link / sync / view)
まだ誰も着手していません。
評価
調査の方向性
まず既存の create_pull_request ツールと update_pull_request ツールを確認し、その後、それらの base の連鎖動作を、提案されている get_stack および link_stack 操作と比較します。エージェントがネイティブな stack を読み取り、順序付けられた pull request または branch のリストから stack を作成または更新でき、順序付けられた layer と trunk が返されれば、最小限の v1 は完成です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Go
- スター
- 33.1k
- フォーク
- 5k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 25
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/github-mcp-server のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/github-mcp-server#3235 ·
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github/github-mcp-server#3042 · コメント 2 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/github-mcp-server#3032 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
github/github-mcp-server#2803 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/github-mcp-server#2740 ·
github/github-mcp-server の issue をすべて見る
似ている issue
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
kind/bug status/0-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
🤔 refinement needed
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
equinor/radix-operator#1979 ·