MCPcopy Index your code
hub / github.com/modelcontextprotocol/registry / IsValidRepositoryURL

Function IsValidRepositoryURL

internal/validators/utils.go:18–26  ·  view source on GitHub ↗

IsValidRepositoryURL checks if the given URL is valid for the specified repository source

(source RepositorySource, url string)

Source from the content-addressed store, hash-verified

16
17// IsValidRepositoryURL checks if the given URL is valid for the specified repository source
18func IsValidRepositoryURL(source RepositorySource, url string) bool {
19 switch source {
20 case SourceGitHub:
21 return githubURLRegex.MatchString(url)
22 case SourceGitLab:
23 return gitlabURLRegex.MatchString(url)
24 }
25 return false
26}
27
28// HasNoSpaces checks if a string contains no spaces
29func HasNoSpaces(s string) bool {

Callers 1

validateRepositoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…