Add notes about project scope to various commands (#6907)

This commit is contained in:
Sam Coe 2023-01-24 09:22:20 -08:00 committed by GitHub
parent 700bda3ad8
commit 63ad804a26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View file

@ -55,6 +55,12 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
cmd := &cobra.Command{
Use: "create",
Short: "Create a new issue",
Long: heredoc.Doc(`
Create an issue on GitHub.
Adding an issue to projects requires authorization with the "project" scope.
To authorize, run "gh auth refresh -s project".
`),
Example: heredoc.Doc(`
$ gh issue create --title "I found a bug" --body "Nothing works"
$ gh issue create --label "bug,help wanted"

View file

@ -45,6 +45,12 @@ func NewCmdEdit(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman
cmd := &cobra.Command{
Use: "edit {<number> | <url>}",
Short: "Edit an issue",
Long: heredoc.Doc(`
Edit an issue.
Editing an issue's projects requires authorization with the "project" scope.
To authorize, run "gh auth refresh -s project".
`),
Example: heredoc.Doc(`
$ gh issue edit 23 --title "I found a bug" --body "Nothing works"
$ gh issue edit 23 --add-label "bug,help wanted" --remove-label "core"

View file

@ -110,6 +110,9 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
By default, users with write access to the base repository can push new commits to the
head branch of the pull request. Disable this with %[1]s--no-maintainer-edit%[1]s.
Adding a pull request to projects requires authorization with the "project" scope.
To authorize, run "gh auth refresh -s project".
`, "`"),
Example: heredoc.Doc(`
$ gh pr create --title "The bug is fixed" --body "Everything works again"

View file

@ -50,6 +50,9 @@ func NewCmdEdit(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman
Without an argument, the pull request that belongs to the current branch
is selected.
Editing a pull request's projects requires authorization with the "project" scope.
To authorize, run "gh auth refresh -s project".
`),
Example: heredoc.Doc(`
$ gh pr edit 23 --title "I found a bug" --body "Nothing works"