github / github/gh-stack

Reordering a stack can cause PRs to be incorrectly marked as merged

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

描述

## Problem

After reordering a published stack, I ran:

```bash
gh stack modify
gh stack push
gh stack submit
```

`gh stack push` updated the branch ancestry without updating the existing PR bases. Some PRs then targeted descendant branches that already contained their commits.

GitHub saw empty diffs and automatically marked those PRs as merged, although their commits were never merged into `main`. The PRs could not be reopened and had to be recreated with new branch names.

## Version

`gh stack version 0.0.8`

## Expected behavior

I expected `gh stack push` either
- to update the remote stack to match the reordered local stack,
- or to fail and tell me to use `gh stack submit` for this operation.

貢獻指南

開啟貢獻指南

研究方向

先從 `gh stack push` 背後的實作開始,接著追蹤重新排序的 stack 祖先關係和現有 PR base 是如何處理的。重現報告中的 `gh stack modify`、`gh stack push` 和 `gh stack submit` 序列;完成的標準是 push 能安全地同步遠端 stack,或明確引導使用者執行 submit,同時不會錯誤地將 PR 標記為 merged。

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

評估

技術堆疊
github, go
領域
cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
48/100

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

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