Clarify gh auth refresh command behavior (#7132)

This commit is contained in:
Alex Petrov 2023-03-12 22:08:32 -04:00 committed by GitHub
parent cff5dec2ce
commit 76f6aa1fc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,8 +58,13 @@ func NewCmdRefresh(f *cmdutil.Factory, runF func(*RefreshOptions) error) *cobra.
Short: "Refresh stored authentication credentials",
Long: heredoc.Doc(`Expand or fix the permission scopes for stored credentials.
The --scopes flag accepts a comma separated list of scopes you want your gh credentials to have. If
absent, this command ensures that gh has access to a minimum set of scopes.
The --scopes flag accepts a comma separated list of scopes you want
your gh credentials to have. If no scopes are provided, the command
maintains previously added scopes.
The command can only add additional scopes, but not remove previously
added ones. To reset scopes to the default minimum set of scopes, you
will need to create new credentials using the auth login command.
`),
Example: heredoc.Doc(`
$ gh auth refresh --scopes write:org,read:public_key