Add examples for template usage in PR and issue creation

This commit is contained in:
William Martin 2024-07-23 13:14:27 +02:00
parent a4da98d49a
commit 32e499e090
2 changed files with 3 additions and 1 deletions

View file

@ -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
}

View file

@ -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"},