MCPcopy
hub / github.com/cli/cli / getOrgVariables

Function getOrgVariables

pkg/cmd/variable/list/list.go:204–217  ·  view source on GitHub ↗
(client *http.Client, host, orgName string, showSelectedRepoInfo bool)

Source from the content-addressed store, hash-verified

202}
203
204func getOrgVariables(client *http.Client, host, orgName string, showSelectedRepoInfo bool) ([]shared.Variable, error) {
205 variables, err := getVariables(client, host, fmt.Sprintf("orgs/%s/actions/variables", orgName))
206 if err != nil {
207 return nil, err
208 }
209 apiClient := api.NewClientFromHTTP(client)
210 if showSelectedRepoInfo {
211 err = shared.PopulateMultipleSelectedRepositoryInformation(apiClient, host, variables)
212 if err != nil {
213 return nil, err
214 }
215 }
216 return variables, nil
217}
218
219func getVariables(client *http.Client, host, path string) ([]shared.Variable, error) {
220 var results []shared.Variable

Callers 1

listRunFunction · 0.85

Calls 3

NewClientFromHTTPFunction · 0.92
getVariablesFunction · 0.85

Tested by

no test coverage detected