github / github/gh-stack

No way to delete a stack locally whose branches are deleted

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

描述

### Context
Our repo has the "Delete head on merge" option, which makes it so that when merging a stack from the GitHub website, the feature branches get deleted also.
Locally, I also ran `gh stack sync` which prompted me to prune the branches.

The stack remained for some reason (I see there's a [related bug](https://github.com/github/gh-stack/issues/137)), so I tried to unstack it locally since it no longer existed on remote.

### Issue / Feature request
I expected that `gh stack unstack --local` would destroy the stack even if the branches do not exist but it failed.

To clean my local repo, I had to re-create the branches in the stack with the same names and then unstack succeeded.

Is it possible to have `unstack` in the case where both the local & remote branches no longer exist to consider them pruned, skip them, and not fail?

貢獻指南

開啟貢獻指南

研究方向

從 `gh stack unstack --local` 入口開始,在 `gh stack sync` 清理了 stack 分支後重現該失敗。追蹤 unstack 如何處理缺少的本地分支和遠端分支,然後驗證同時刪除了這兩類分支的 stack 能夠在不失敗的情況下被移除。

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

評估

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

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

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