MCPcopy Create free account
hub / github.com/JordanCoin/codemap / isGitHubURL

Function isGitHubURL

main.go:787–794  ·  view source on GitHub ↗

isGitHubURL checks if the input looks like a GitHub repo URL

(s string)

Source from the content-addressed store, hash-verified

785
786// isGitHubURL checks if the input looks like a GitHub repo URL
787func isGitHubURL(s string) bool {
788 s = strings.ToLower(s)
789 return strings.HasPrefix(s, "github.com/") ||
790 strings.HasPrefix(s, "https://github.com/") ||
791 strings.HasPrefix(s, "http://github.com/") ||
792 strings.HasPrefix(s, "gitlab.com/") ||
793 strings.HasPrefix(s, "https://gitlab.com/")
794}
795
796// cloneRepo clones a git repo to a temp directory (shallow clone)
797func cloneRepo(url string, repoName string) (string, error) {

Callers 3

resolveBlastRadiusRootFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1