Merge pull request #9354 from cli/9220-getting-template-not-found-errors-for-gh-pr-create-template=

Clarify usage of template flags for PR and issue creation
This commit is contained in:
Andy Feller 2024-07-23 08:45:35 -04:00 committed by GitHub
commit 5df84b5019
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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"},