Wrap scopes

This commit is contained in:
Yukai Chou 2023-11-23 07:22:57 +08:00
parent 061ec2f51b
commit b14da6c63f
7 changed files with 7 additions and 7 deletions

View file

@ -63,7 +63,7 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm
See %[1]sgh auth status%[1]s for its stored location.
Alternatively, use %[1]s--with-token%[1]s to pass in a token on standard input.
The minimum required scopes for the token are: "repo", "read:org".
The minimum required scopes for the token are: %[1]srepo%[1]s, %[1]sread:org%[1]s.
Alternatively, gh will use the authentication token found in environment variables.
This method is most suitable for "headless" use of gh such as in automation. See

View file

@ -68,7 +68,7 @@ func NewCmdRefresh(f *cmdutil.Factory, runF func(*RefreshOptions) error) *cobra.
The %[1]s--remove-scopes%[1]s flag accepts a comma separated list of scopes you
want to remove from your gh credentials. Scope removal is idempotent.
The minimum set of scopes ("repo", "read:org" and "gist") cannot be removed.
The minimum set of scopes (%[1]srepo%[1]s, %[1]sread:org%[1]s, and %[1]sgist%[1]s) cannot be removed.
The %[1]s--reset-scopes%[1]s flag resets the scopes for your gh credentials to
the default set of scopes for your auth flow.

View file

@ -59,7 +59,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
Long: heredoc.Docf(`
Create an issue on GitHub.
Adding an issue to projects requires authorization with the "project" scope.
Adding an issue to projects requires authorization with the %[1]sproject%[1]s scope.
To authorize, run %[1]sgh auth refresh -s project%[1]s.
`, "`"),
Example: heredoc.Doc(`

View file

@ -53,7 +53,7 @@ func NewCmdEdit(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman
Long: heredoc.Docf(`
Edit one or more issues within the same repository.
Editing issues' projects requires authorization with the "project" scope.
Editing issues' projects requires authorization with the %[1]sproject%[1]s scope.
To authorize, run %[1]sgh auth refresh -s project%[1]s.
`, "`"),
Example: heredoc.Doc(`

View file

@ -118,7 +118,7 @@ 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.
Adding a pull request to projects requires authorization with the %[1]sproject%[1]s scope.
To authorize, run %[1]sgh auth refresh -s project%[1]s.
`, "`"),
Example: heredoc.Doc(`

View file

@ -53,7 +53,7 @@ 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.
Editing a pull request's projects requires authorization with the %[1]sproject%[1]s scope.
To authorize, run %[1]sgh auth refresh -s project%[1]s.
`, "`"),
Example: heredoc.Doc(`

View file

@ -50,7 +50,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
Use the %[1]s--parents%[1]s flag to control whether rulesets configured at higher levels that also apply to the provided
repository or organization should be returned. The default is %[1]strue%[1]s.
Your access token must have the "admin:org" scope to use the %[1]s--org%[1]s flag, which can be granted by running %[1]sgh auth refresh -s admin:org%[1]s.
Your access token must have the %[1]sadmin:org%[1]s scope to use the %[1]s--org%[1]s flag, which can be granted by running %[1]sgh auth refresh -s admin:org%[1]s.
`, "`"),
Example: heredoc.Doc(`
# List rulesets in the current repository