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

Function fmtVisibility

pkg/cmd/variable/list/list.go:180–194  ·  view source on GitHub ↗
(s shared.Variable)

Source from the content-addressed store, hash-verified

178}
179
180func fmtVisibility(s shared.Variable) string {
181 switch s.Visibility {
182 case shared.All:
183 return "Visible to all repositories"
184 case shared.Private:
185 return "Visible to private repositories"
186 case shared.Selected:
187 if s.NumSelectedRepos == 1 {
188 return "Visible to 1 selected repository"
189 } else {
190 return fmt.Sprintf("Visible to %d selected repositories", s.NumSelectedRepos)
191 }
192 }
193 return ""
194}
195
196func getRepoVariables(client *http.Client, repo ghrepo.Interface) ([]shared.Variable, error) {
197 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "actions", "variables")

Callers 1

listRunFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected