From cc2b86f3a6bf7ebae05eee7a6dfa7bb3573fc39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 1 Oct 2020 19:56:33 +0200 Subject: [PATCH] Specify minimum required token scopes in `gh help auth login` --- pkg/cmd/auth/login/login.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/auth/login/login.go b/pkg/cmd/auth/login/login.go index 30c60bdc0..9504f8f29 100644 --- a/pkg/cmd/auth/login/login.go +++ b/pkg/cmd/auth/login/login.go @@ -43,13 +43,14 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm Use: "login", Args: cobra.ExactArgs(0), Short: "Authenticate with a GitHub host", - Long: heredoc.Doc(`Authenticate with a GitHub host. + Long: heredoc.Docf(` + Authenticate with a GitHub host. - This interactive command initializes your authentication state either by helping you log into - GitHub via browser-based OAuth or by accepting a Personal Access Token. + The default authentication mode is a web-based browser flow. - The interactivity can be avoided by specifying --with-token and passing a token on STDIN. - `), + Alternatively, pass in a token on standard input by using %[1]s--with-token%[1]s. + The minimum required scopes for the token are: "repo", "read:org". + `, "`"), Example: heredoc.Doc(` $ gh auth login # => do an interactive setup