Documentation
¶
Index ¶
Constants ¶
View Source
const GH_CLI_COMMAND = "gh auth token"
View Source
const GITHUB_TOKEN_ENV = "GITHUB_OAUTH_TOKEN"
Variables ¶
This section is empty.
Functions ¶
func GetGHToken ¶
func GetGHToken() string
GetGHToken retrieves a GitHub access token from the environment variable `GITHUB_OAUTH_TOKEN`. If the environment variable is not set, it attempts to obtain the token by executing the GitHub CLI `gh auth token` command. If both methods fail, the function terminates the program with a fatal error, providing guidance for the user.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.