MCPcopy
hub / github.com/cli/cli / FromFullNameWithHost

Function FromFullNameWithHost

internal/ghrepo/repo.go:52–58  ·  view source on GitHub ↗

FromFullNameWithHost is like FromFullName that defaults to a specific host for values that don't explicitly include a hostname.

(nwo, fallbackHost string)

Source from the content-addressed store, hash-verified

50// FromFullNameWithHost is like FromFullName that defaults to a specific host for values that don't
51// explicitly include a hostname.
52func FromFullNameWithHost(nwo, fallbackHost string) (Interface, error) {
53 repo, err := repository.ParseWithHost(nwo, fallbackHost)
54 if err != nil {
55 return nil, err
56 }
57 return NewWithHost(repo.Owner, repo.Name, repo.Host), nil
58}
59
60// FromURL extracts the GitHub repository information from a git remote URL
61func FromURL(u *url.URL) (Interface, error) {

Callers 8

transferRunFunction · 0.92
Test_getRunFunction · 0.92
TestRemoveRunFunction · 0.92
getRepoIdsFunction · 0.92
Test_removeRun_repoFunction · 0.92
Test_removeRun_envFunction · 0.92
mapRepoNamesToIDsFunction · 0.92
FromFullNameFunction · 0.85

Calls 1

NewWithHostFunction · 0.85

Tested by 4

Test_getRunFunction · 0.74
TestRemoveRunFunction · 0.74
Test_removeRun_repoFunction · 0.74
Test_removeRun_envFunction · 0.74