From bfd1d804a8e59c5611ef0d36813564702d13e706 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Mon, 27 Jan 2020 16:00:11 -0600 Subject: [PATCH 1/2] prevent graphql error --- command/pr_create.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/pr_create.go b/command/pr_create.go index 279a19e65..f37bf4bc1 100644 --- a/command/pr_create.go +++ b/command/pr_create.go @@ -174,6 +174,10 @@ func prCreate(cmd *cobra.Command, _ []string) error { } if action == SubmitAction { + if title == "" { + return fmt.Errorf("Can't create a PR without a title.") + } + params := map[string]interface{}{ "title": title, "body": body, From 90258384487e2030d2fbb5f2e817cc14317bf968 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 28 Jan 2020 10:20:59 -0600 Subject: [PATCH 2/2] update error text --- command/pr_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/pr_create.go b/command/pr_create.go index f37bf4bc1..5e2190cc0 100644 --- a/command/pr_create.go +++ b/command/pr_create.go @@ -175,7 +175,7 @@ func prCreate(cmd *cobra.Command, _ []string) error { if action == SubmitAction { if title == "" { - return fmt.Errorf("Can't create a PR without a title.") + return fmt.Errorf("pull request title must not be blank") } params := map[string]interface{}{