MCPcopy Index your code
hub / github.com/cli/cli / authHelp

Function authHelp

pkg/cmd/root/help.go:210–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208}
209
210func authHelp() string {
211 if os.Getenv("GITHUB_ACTIONS") == "true" {
212 return heredoc.Doc(`
213 gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example:
214 env:
215 GH_TOKEN: ${{ github.token }}
216 `)
217 }
218
219 if os.Getenv("CI") != "" {
220 return heredoc.Doc(`
221 gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.
222 `)
223 }
224
225 return heredoc.Doc(`
226 To get started with GitHub CLI, please run: gh auth login
227 Alternatively, populate the GH_TOKEN environment variable with a GitHub API authentication token.
228 `)
229}
230
231func findCommand(cmd *cobra.Command, name string) *cobra.Command {
232 for _, c := range cmd.Commands() {

Callers 1

NewCmdRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected