MCPcopy Create free account
hub / github.com/ddev/ddev / HasGitHubToken

Function HasGitHubToken

pkg/github/github.go:146–149  ·  view source on GitHub ↗

HasGitHubToken returns true if a GitHub token is set in the environment.

()

Source from the content-addressed store, hash-verified

144
145// HasGitHubToken returns true if a GitHub token is set in the environment.
146func HasGitHubToken() bool {
147 token, _ := GetGitHubToken()
148 return token != ""
149}
150
151// HasInvalidGitHubToken checks if the response indicates an invalid GitHub token.
152// This is possible if we get 401 or 404 response.

Callers 10

TestGetAddonTarballURLFunction · 0.92
TestGetGitHubReleaseFunction · 0.92
TestCmdAddonFunction · 0.92
TestCmdAddonInstalledFunction · 0.92
TestCmdAddonSearchFunction · 0.92
TestCmdAddonProjectFlagFunction · 0.92
TestAddonGetWithPRFlagFunction · 0.92

Calls 1

GetGitHubTokenFunction · 0.85

Tested by 10

TestGetAddonTarballURLFunction · 0.74
TestGetGitHubReleaseFunction · 0.74
TestCmdAddonFunction · 0.74
TestCmdAddonInstalledFunction · 0.74
TestCmdAddonSearchFunction · 0.74
TestCmdAddonProjectFlagFunction · 0.74
TestAddonGetWithPRFlagFunction · 0.74