Skip interactive mode in pr create if title & body were passed
This matches `issue create` behavior 4b32e3f215
This commit is contained in:
parent
cedf94f450
commit
34fc3457d6
1 changed files with 3 additions and 2 deletions
|
|
@ -208,8 +208,9 @@ func prCreate(cmd *cobra.Command, _ []string) error {
|
|||
Milestone: milestoneTitle,
|
||||
}
|
||||
|
||||
// TODO: only drop into interactive mode if stdin & stdout are a tty
|
||||
if !isWeb && !autofill && (title == "" || body == "") {
|
||||
interactive := !(cmd.Flags().Changed("title") && cmd.Flags().Changed("body"))
|
||||
|
||||
if !isWeb && !autofill && interactive {
|
||||
var templateFiles []string
|
||||
if rootDir, err := git.ToplevelDir(); err == nil {
|
||||
// TODO: figure out how to stub this in tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue