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

Function fmtVisibility

pkg/cmd/secret/list/list.go:235–249  ·  view source on GitHub ↗
(s Secret)

Source from the content-addressed store, hash-verified

233}
234
235func fmtVisibility(s Secret) string {
236 switch s.Visibility {
237 case shared.All:
238 return "Visible to all repositories"
239 case shared.Private:
240 return "Visible to private repositories"
241 case shared.Selected:
242 if s.NumSelectedRepos == 1 {
243 return "Visible to 1 selected repository"
244 } else {
245 return fmt.Sprintf("Visible to %d selected repositories", s.NumSelectedRepos)
246 }
247 }
248 return ""
249}
250
251func getOrgSecrets(client *http.Client, host, orgName string, showSelectedRepoInfo bool, app shared.App) ([]Secret, error) {
252 u, err := safeurl.JoinPath("orgs", orgName, string(app), "secrets")

Callers 1

listRunFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected