MCPcopy Index your code
hub / github.com/coder/coder / IsGithubDotComURL

Function IsGithubDotComURL

coderd/externalauth/externalauth.go:1388–1395  ·  view source on GitHub ↗

IsGithubDotComURL returns true if the given URL is a github.com URL.

(str string)

Source from the content-addressed store, hash-verified

1386
1387// IsGithubDotComURL returns true if the given URL is a github.com URL.
1388func IsGithubDotComURL(str string) bool {
1389 str = strings.ToLower(str)
1390 ghURL, err := url.Parse(str)
1391 if err != nil {
1392 return false
1393 }
1394 return ghURL.Host == "github.com"
1395}
1396
1397// isRateLimited checks whether an HTTP response indicates a rate
1398// limit rather than a genuine authorization failure. It returns

Callers 2

userOAuth2GithubMethod · 0.92
RefreshTokenMethod · 0.85

Calls 1

ParseMethod · 0.65

Tested by

no test coverage detected