From bc73e28842125c9499e46b5f0b5b41ace7a5ee72 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Tue, 17 Sep 2024 15:04:58 +0100 Subject: [PATCH 1/3] Be verbose when failing issue create --- internal/cmd/issue/create/create.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cmd/issue/create/create.go b/internal/cmd/issue/create/create.go index 5e418826..f50e5b20 100644 --- a/internal/cmd/issue/create/create.go +++ b/internal/cmd/issue/create/create.go @@ -128,6 +128,7 @@ func create(cmd *cobra.Command, _ []string) { resp, err := client.CreateV2(&cr) if err != nil { + fmt.Printf("\nCreation failed. Text dump follows.\nSummary:\n--------\n%s\n\nBody:\n-----\n%s\n\n", params.summary, params.body) return "", err } return resp.Key, nil From bd1435dc927f7ef2197c56fd5416f8dd5feb92d4 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Tue, 17 Sep 2024 15:13:56 +0100 Subject: [PATCH 2/3] Fix param name --- internal/cmd/issue/create/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/issue/create/create.go b/internal/cmd/issue/create/create.go index f50e5b20..17101207 100644 --- a/internal/cmd/issue/create/create.go +++ b/internal/cmd/issue/create/create.go @@ -128,7 +128,7 @@ func create(cmd *cobra.Command, _ []string) { resp, err := client.CreateV2(&cr) if err != nil { - fmt.Printf("\nCreation failed. Text dump follows.\nSummary:\n--------\n%s\n\nBody:\n-----\n%s\n\n", params.summary, params.body) + fmt.Printf("\nCreation failed. Text dump follows.\nSummary:\n--------\n%s\n\nBody:\n-----\n%s\n\n", params.Summary, params.Body) return "", err } return resp.Key, nil From 76036213a7812b6728900ac97e2d8e5d17f14583 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Tue, 17 Sep 2024 15:17:01 +0100 Subject: [PATCH 3/3] Fix spacing --- internal/cmd/issue/create/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/issue/create/create.go b/internal/cmd/issue/create/create.go index 17101207..71324e20 100644 --- a/internal/cmd/issue/create/create.go +++ b/internal/cmd/issue/create/create.go @@ -128,7 +128,7 @@ func create(cmd *cobra.Command, _ []string) { resp, err := client.CreateV2(&cr) if err != nil { - fmt.Printf("\nCreation failed. Text dump follows.\nSummary:\n--------\n%s\n\nBody:\n-----\n%s\n\n", params.Summary, params.Body) + fmt.Printf("\nCreation failed. Text dump follows.\nSummary:\n--------\n%s\n\nBody:\n-----\n%s\n", params.Summary, params.Body) return "", err } return resp.Key, nil