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

Function getRepoVariables

pkg/cmd/variable/list/list.go:196–202  ·  view source on GitHub ↗
(client *http.Client, repo ghrepo.Interface)

Source from the content-addressed store, hash-verified

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")
198 if err != nil {
199 return nil, err
200 }
201 return getVariables(client, repo.RepoHost(), u)
202}
203
204func getEnvVariables(client *http.Client, repo ghrepo.Interface, envName string) ([]shared.Variable, error) {
205 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "environments", envName, "variables")

Callers 1

listRunFunction · 0.85

Calls 5

JoinPathFunction · 0.92
getVariablesFunction · 0.85
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected