fix: reconcile the issues stream and remove the legacy output shims

Use one canPrompt and pullNumberArguments for the comment commands, set
display preferences instead of the retired environment variables in
tests, and delete writeList, writeItem, batch, table, writeRecord(s),
the legacy column map, confirm, require, validateMilestoneFlags and
listWindow now that every command uses their replacements.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 00:19:35 +02:00
1 parent 511252e2a5
commit ae0ea27bb0
13 files changed
+23 -172

No files matched your search

+1 -21
View File
@@ -244,10 +244,7 @@ $ tea issue create --title "Idea" --web`, Args: argsExact(0), RunE: func(cmd *co
return err
}
}
prompt, err := a.canPrompt()
if err != nil {
return err
}
prompt := a.canPrompt()
if !localFlagsChanged(cmd) && prompt && a.deps.IssueForm != nil {
return a.createIssueInteractively(cmd)
}
@@ -491,23 +488,6 @@ func milestoneID(cmd *cobra.Command, t target, raw string) (int64, error) {
return milestone.ID, err
}
// validateMilestoneFlags checks the --milestone ID and --milestone-name flags of pr create and pr
// edit before any request.
func validateMilestoneFlags(cmd *cobra.Command, name string, id int64) error {
if cmd.Flags().Changed("milestone-name") {
if cmd.Flags().Changed("milestone") {
return clierr.Wrap(clierr.Usage, errors.New("--milestone and --milestone-name are mutually exclusive"))
}
if strings.TrimSpace(name) == "" {
return clierr.Wrap(clierr.Usage, errors.New("--milestone-name cannot be empty; use --milestone=0 for none"))
}
}
if id < 0 {
return clierr.Wrap(clierr.Usage, errors.New("--milestone must be a positive ID, or 0 for none"))
}
return nil
}
func milestoneChoices(items []services.Milestone) []terminal.IssueMilestoneChoice {
choices := make([]terminal.IssueMilestoneChoice, len(items))
for i, item := range items {