refactor: remove helpers the new output and prompts left unused

Drop writeDownload, terminal.Require, terminal.Confirm, terminal.Row,
terminal.Record and Pulls.FindOpenByHead, which no command calls anymore,
and point their tests at the code that replaced them.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 10:00:05 +02:00
1 parent eff6efe759
commit 50a604f169
8 files changed
+34 -118

No files matched your search

-11
View File
@@ -205,11 +205,6 @@ func RequireInput(ctx context.Context, value *string, flag, label string, valida
return true, nil
}
// Require is RequireInput titled by the flag name, for callers without a human label.
func Require(ctx context.Context, value *string, flag string, streams Streams, policy Policy, prompt Prompter) (bool, error) {
return RequireInput(ctx, value, flag, flag, nil, streams, policy, prompt)
}
// Confirmation describes the question asked before an action.
type Confirmation struct {
// Prompt asks about the action in sentence case: `Delete label "bug" from alice/x?`.
@@ -267,9 +262,3 @@ func ConfirmAction(ctx context.Context, c Confirmation, yes bool, streams Stream
}
return err
}
// Confirm requires explicit acceptance unless confirmation was supplied by flag.
// It is ConfirmAction for callers that predate Confirmation.
func Confirm(ctx context.Context, description string, yes bool, streams Streams, policy Policy, prompt Prompter) error {
return ConfirmAction(ctx, Confirmation{Prompt: description}, yes, streams, policy, prompt)
}