fix for base correction branch for gh pr create. - #460
Conversation
| fmt.Fprintln(cmd.OutOrStdout(), pr.URL) | ||
| } else if action == PreviewAction { | ||
| var title, body string | ||
| if title != "" { |
There was a problem hiding this comment.
This part is actually for consistency, we don't wan body=&title= if there is no body and title at all.
| break | ||
| } | ||
|
|
||
| isWeb, err := cmd.Flags().GetBool("web") |
There was a problem hiding this comment.
This part is moved below, because if its here this can open the web with a different URL. i.e no base branch, which will default to master as base branch.
|
|
||
| fmt.Fprintln(cmd.OutOrStdout(), pr.URL) | ||
| } else if action == PreviewAction { | ||
| var title, body string |
There was a problem hiding this comment.
this is shadowing the existing title and body variables, breaking the preview in browser flow. unfortunately the tests didn't catch it.
|
oh i guess this is being covered in #483 sorry for my confusion |
|
@ambareeshb Thank you for your contribution! Because we didn't want any change in functionality bundled with this fix (your approach yields slightly different output, as evident by test changes) and we don't want |
Thank you for review. |
Solves #319