MCPcopy Create free account
hub / github.com/cli/cli / isArtifactURL

Function isArtifactURL

pkg/cmd/issue/artifact/shared/shared.go:140–143  ·  view source on GitHub ↗

isArtifactURL reports whether arg is meant as an artifact URL: an http(s) URL whose path goes on past its issue number. parseArtifactURL decides whether it's a valid one.

(arg string)

Source from the content-addressed store, hash-verified

138// URL whose path goes on past its issue number. parseArtifactURL decides
139// whether it's a valid one.
140func isArtifactURL(arg string) bool {
141 u, err := url.Parse(arg)
142 return err == nil && (u.Scheme == "http" || u.Scheme == "https") && pastIssuePath.MatchString(u.Path)
143}
144
145// parseArtifactURLs reads every argument as an artifact URL on the same
146// issue.

Callers 2

ParseArtifactArgsFunction · 0.85
ParseArtifactArgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected