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

Function parseRepoVisibility

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

Source from the content-addressed store, hash-verified

176)
177
178func parseRepoVisibility(s string) (RepoVisibility, error) {
179 switch s {
180 case "public":
181 return RepoVisibilityPublic, nil
182 case "private":
183 return RepoVisibilityPrivate, nil
184 case "internal":
185 return RepoVisibilityInternal, nil
186 default:
187 return "", fmt.Errorf("unknown repository visibility: %q", s)
188 }
189}
190
191// FetchRepoVisibility returns the repository visibility: "public", "private", or "internal".
192func 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