From b98bd2cfb825ec6377bf69aa8adc820268e04017 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 20 Dec 2019 10:58:25 -0800 Subject: [PATCH] Use base branch --- command/pr_create.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/command/pr_create.go b/command/pr_create.go index 132cb3244..df457d407 100644 --- a/command/pr_create.go +++ b/command/pr_create.go @@ -45,7 +45,15 @@ func prCreate(cmd *cobra.Command, _ []string) error { return err } - fmt.Fprintf(colorableOut(cmd), "\nCreating pull request for %s in %s/%s\n\n", utils.Cyan(head), repo.RepoOwner(), repo.RepoName()) + target, err := cmd.Flags().GetString("base") + if err != nil { + return err + } + if target == "" { + target = "master" + } + + fmt.Fprintf(colorableErr(cmd), "\nCreating pull request for %s into %s in %s/%s\n\n", utils.Cyan(head), utils.Cyan(target), repo.RepoOwner(), repo.RepoName()) if err = git.Push(remote, fmt.Sprintf("HEAD:%s", head)); err != nil { return err