github / github/gh-stack

Incorrect "PR #5 remains open" remains open after git stack modify for a PR that is already closed

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

描述

1. Use `gs submit` to create stack with depth 2. Let's say branch names `layer1` and `layer2`
2. I close the PR for `layer2` in the GitHub UI
3. I want to remove the stack locally, so I use `git stack modify`, press `x` to delete the layer, and then `Control+S` to save.

I get the following output
```
$ gs modify
✓ Dropped layer2 from stack

✓ Stack modified successfully
Dropped: layer 2(PR #53155 remains open — close with `gh pr close 53155`)

Run `gh stack submit` to push your changes and update the stack of PRs on GitHub
```

Now `gh` cli can clearly tell the PR is already closed, because when I try to close it:
```
$ gh pr close 53155
! Pull request repo#53155 (PR Title) is already closed
```

I think a fix will be doing a resync on the state from GitHub before showing this message.

貢獻指南

開啟貢獻指南

研究方向

從 `git stack modify` 的儲存流程開始,包括 `gs modify` 輸出將已捨棄的層回報為仍處於 open 狀態。檢查在該訊息之前如何取得 GitHub PR 狀態;當一個在 GitHub 中已經關閉的 PR 在刪除該層後不再被回報為 open 時,即完成。

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

評估

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

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

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