Set default publish action to draft if --draft option is set

This commit is contained in:
Tomohiro Nishimura 2021-10-19 22:37:16 +09:00
parent 06c06c87dc
commit c7f79e8447
No known key found for this signature in database
GPG key ID: F7B0016CCB836A72

View file

@ -241,6 +241,11 @@ func createRun(opts *CreateOptions) error {
opts.Body = text
}
var defaultSubmit string
if opts.Draft {
defaultSubmit = "Save as draft"
}
qs = []*survey.Question{
{
Name: "prerelease",
@ -258,6 +263,7 @@ func createRun(opts *CreateOptions) error {
"Save as draft",
"Cancel",
},
Default: defaultSubmit,
},
},
}