MCPcopy Index your code
hub / github.com/cli/cli / ParseRepoURL

Function ParseRepoURL

internal/skills/source/source.go:20–32  ·  view source on GitHub ↗

ParseRepoURL parses a repository URL stored in skill metadata.

(raw string)

Source from the content-addressed store, hash-verified

18
19// ParseRepoURL parses a repository URL stored in skill metadata.
20func ParseRepoURL(raw string) (ghrepo.Interface, error) {
21 raw = strings.TrimSpace(raw)
22 if raw == "" {
23 return nil, fmt.Errorf("repository URL is empty")
24 }
25
26 repo, err := ghrepo.FromFullName(raw)
27 if err != nil {
28 return nil, fmt.Errorf("invalid repository URL %q: %w", raw, err)
29 }
30
31 return repo, nil
32}
33
34// ParseMetadataRepo extracts repository information from skill metadata.
35func ParseMetadataRepo(meta map[string]interface{}) (ghrepo.Interface, bool, error) {

Callers 3

parseInstalledSkillFunction · 0.92
checkUpstreamProvenanceFunction · 0.92
ParseMetadataRepoFunction · 0.85

Calls 2

FromFullNameFunction · 0.92
ErrorfMethod · 0.65

Tested by

no test coverage detected