From 32e499e090af181ae78c303269b9d69bf89ea295 Mon Sep 17 00:00:00 2001 From: William Martin Date: Tue, 23 Jul 2024 13:14:27 +0200 Subject: [PATCH] Add examples for template usage in PR and issue creation --- pkg/cmd/issue/create/create.go | 3 ++- pkg/cmd/pr/create/create.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/issue/create/create.go b/pkg/cmd/issue/create/create.go index 6de78f2e1..33b583012 100644 --- a/pkg/cmd/issue/create/create.go +++ b/pkg/cmd/issue/create/create.go @@ -72,6 +72,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co $ gh issue create --assignee monalisa,hubot $ gh issue create --assignee "@me" $ gh issue create --project "Roadmap" + $ gh issue create --template "bug_report.md" `), Args: cmdutil.NoArgsQuoteReminder, Aliases: []string{"new"}, @@ -139,7 +140,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co cmd.Flags().StringSliceVarP(&opts.Projects, "project", "p", nil, "Add the issue to projects by `name`") cmd.Flags().StringVarP(&opts.Milestone, "milestone", "m", "", "Add the issue to a milestone by `name`") cmd.Flags().StringVar(&opts.RecoverFile, "recover", "", "Recover input from a failed run of create") - cmd.Flags().StringVarP(&opts.Template, "template", "T", "", "Template `name` to use as starting body text") + cmd.Flags().StringVarP(&opts.Template, "template", "T", "", "Template `file` to use as starting body text") return cmd } diff --git a/pkg/cmd/pr/create/create.go b/pkg/cmd/pr/create/create.go index 7c3faecc3..23f302069 100644 --- a/pkg/cmd/pr/create/create.go +++ b/pkg/cmd/pr/create/create.go @@ -131,6 +131,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co $ gh pr create --reviewer monalisa,hubot --reviewer myorg/team-name $ gh pr create --project "Roadmap" $ gh pr create --base develop --head monalisa:feature + $ gh pr create --template "pull_request_template.md" `), Args: cmdutil.NoArgsQuoteReminder, Aliases: []string{"new"},