github / github/gh-stack

A conflict low in a stack blocks merging PRs above it, even when they merge cleanly

未關閉
#449 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
1.5k
分支
70
平均合併
1 天 8 小時
30 天內合併 PR
7

描述

**The problem**

Say `main ← PR1 ← PR2`. PR1 has merge conflicts against `main` and can't be merged. PR2 against PR1 is completely fine — no conflicts at all.

Merging is all-or-nothing for the whole chain up to `main`: if any PR in the stack can't be merged, none of them are. So even though PR2's changes are ready and conflict-free relative to PR1, there's no way to merge it — it's stuck behind PR1's unrelated conflict with `main`.

**Impact**

A single conflict low in a stack blocks everything built on top of it, even work that's fully ready and has nothing to do with that conflict. Teams end up stuck waiting on someone to resolve the bottom PR's conflict before any of the PRs above it can move forward, with no way to make progress on the parts that are actually ready.

This also blocks deploying feature branches to a staging environment for testing — a common practice at many companies. In this scenario, the feature branch is PR1's branch (the one with the conflict against `main`): deploying it to staging means merging it, and that merge is exactly what's blocked, so the branch can't be deployed until the unrelated conflict is resolved.

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 gh-stack 如何判定堆疊的 pull request 是否可以合併,以及它如何處理用於 staging 部署的分支。定義位於有衝突的 pull request 之上的無衝突 pull request 的預期行為,包括應如何表示其可合併狀態和部署路徑。完成的標準是,較上層的 pull request 可以獨立推進,而不會錯誤地繞過其相依項目。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github, go
領域
cli
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。