HasGitHubToken returns true if a GitHub token is set in the environment.
()
| 144 | |
| 145 | // HasGitHubToken returns true if a GitHub token is set in the environment. |
| 146 | func 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. |