Skip to content

Commit 777915d

Browse files
committed
remove cfg and update help text
1 parent c008d0b commit 777915d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/unstack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func UnstackCmd(cfg *config.Config) *cobra.Command {
2323
Use: "unstack",
2424
Aliases: []string{"delete"},
2525
Short: "Delete a stack locally and on GitHub",
26-
Long: "Remove the current active stack from local tracking and delete it on GitHub. Use --local to only remove local tracking.",
26+
Long: "Remove the current active stack from local tracking and delete it on GitHub. Use --local to only remove local tracking. Full unstack is blocked when every pull request is queued for merge, merging, or already merged",
2727
Example: ` # Delete the stack locally and on GitHub
2828
$ gh stack unstack
2929
@@ -67,7 +67,7 @@ func runUnstack(cfg *config.Config, opts *unstackOptions) error {
6767
return ErrAPIFailure
6868
}
6969

70-
blocked, err := shouldBlockUnstackDelete(cfg, client, s)
70+
blocked, err := shouldBlockUnstackDelete(client, s)
7171
if err != nil {
7272
cfg.Errorf("failed to check pull request states before unstack: %s", err)
7373
return ErrAPIFailure
@@ -118,7 +118,7 @@ func runUnstack(cfg *config.Config, opts *unstackOptions) error {
118118
return nil
119119
}
120120

121-
func shouldBlockUnstackDelete(cfg *config.Config, client github.ClientOps, s *stack.Stack) (bool, error) {
121+
func shouldBlockUnstackDelete(client github.ClientOps, s *stack.Stack) (bool, error) {
122122
if s == nil || len(s.Branches) == 0 {
123123
return false, nil
124124
}

0 commit comments

Comments
 (0)