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?

贡献指南

打开贡献指南

调研方向

Start at the `gh stack unstack --local` entry point and reproduce the failure after `gh stack sync` has pruned the stack branches. Trace how unstack handles missing local and remote branches, then verify that a stack with both kinds of branches deleted is removed without failing.

由索引模型根据 Issue 内容生成。

评估

技术栈
git, github, go
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。