File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -192,8 +192,18 @@ func prCreate(cmd *cobra.Command, _ []string) error {
192192 }
193193 }
194194
195+ isDraft , err := cmd .Flags ().GetBool ("draft" )
196+ if err != nil {
197+ return fmt .Errorf ("could not parse draft: %w" , err )
198+ }
199+
195200 if ! isWeb && ! autofill {
196- fmt .Fprintf (colorableErr (cmd ), "\n Creating pull request for %s into %s in %s\n \n " ,
201+ message := "\n Creating pull request for %s into %s in %s\n \n "
202+ if isDraft {
203+ message = "\n Creating draft pull request for %s into %s in %s\n \n "
204+ }
205+
206+ fmt .Fprintf (colorableErr (cmd ), message ,
197207 utils .Cyan (headBranch ),
198208 utils .Cyan (baseBranch ),
199209 ghrepo .FullName (baseRepo ))
@@ -245,10 +255,6 @@ func prCreate(cmd *cobra.Command, _ []string) error {
245255 return errors .New ("pull request title must not be blank" )
246256 }
247257
248- isDraft , err := cmd .Flags ().GetBool ("draft" )
249- if err != nil {
250- return fmt .Errorf ("could not parse draft: %w" , err )
251- }
252258 if isDraft && isWeb {
253259 return errors .New ("the --draft flag is not supported with --web" )
254260 }
You can’t perform that action at this time.
0 commit comments