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

Function parseRepoVisibility

internal/skills/discovery/discovery.go:177–188  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

175)
176
177func parseRepoVisibility(s string) (RepoVisibility, error) {
178 switch s {
179 case "public":
180 return RepoVisibilityPublic, nil
181 case "private":
182 return RepoVisibilityPrivate, nil
183 case "internal":
184 return RepoVisibilityInternal, nil
185 default:
186 return "", fmt.Errorf("unknown repository visibility: %q", s)
187 }
188}
189
190// FetchRepoVisibility returns the repository visibility: "public", "private", or "internal".
191func FetchRepoVisibility(client *api.Client, host, owner, repo string) (RepoVisibility, error) {

Callers 1

FetchRepoVisibilityFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected