fix(trail): default new trails to Open instead of Draft · Entire
fix(trail): default new trails to Open instead of Draft
8130997→main·
dipree·4w ago·1 file·+3 added/-3 removed
Restore Open as the default status for 'entire trail create' (both the non-interactive path and the interactive form), and update the --status flag help text.
Sessions
26ba2455ae0dView transcript
[?
Fix Trail Creation Branch Handling and ValidationPi·Opus 4.8·3 steps](/content/gh/entireio/cli/session/019ed956-c81a-74d1-9437-9fb289e1410f#timeline-26ba2455ae0d/index.html)
Changes
1
cmd/entire/cli
Mtrail_cmd.go+3/-3
558 unmodified lines
559
560
561
562
562
563
564
565
47 unmodified lines
613
614
615
616
616
617
618
619
529 unmodified lines
1149
1150
1151
1152
1152
1153
1154
1155
558 unmodified lines
cmd.Flags().StringVar(&body, "body", "", "Trail body")
cmd.Flags().StringVar(&base, "base", "", "Base branch (defaults to detected default branch)")
cmd.Flags().StringVar(&branch, "branch", "", "Branch for the trail (defaults to current branch)")
cmd.Flags().StringVar(&status, "status", "", "Initial status (defaults to draft)")
cmd.Flags().StringVar(&status, "status", "", "Initial status (defaults to open)")
cmd.Flags().BoolVar(&checkout, "checkout", false, "Check out the branch after creating it")
return cmd
47 unmodified lines
return errors.New("branch name is required")
}
if statusStr == "" {
statusStr = string(trail.StatusDraft)
statusStr = string(trail.StatusOpen)
}
if status := trail.Status(statusStr); !status.IsValid() {
return fmt.Errorf("invalid status %q: valid values are %s", statusStr, formatValidStatuses())
}
529 unmodified lines
statusOptions = append(statusOptions, huh.NewOption(string(s), string(s)))
}
if *statusStr == "" {
*statusStr = string(trail.StatusDraft)
*statusStr = string(trail.StatusOpen)
}
form = NewAccessibleForm(