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

Function getEnvSecrets

pkg/cmd/secret/list/list.go:302–308  ·  view source on GitHub ↗
(client *http.Client, repo ghrepo.Interface, envName string)

Source from the content-addressed store, hash-verified

300}
301
302func getEnvSecrets(client *http.Client, repo ghrepo.Interface, envName string) ([]Secret, error) {
303 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "environments", envName, "secrets")
304 if err != nil {
305 return nil, err
306 }
307 return getSecrets(client, repo.RepoHost(), path)
308}
309
310func getRepoSecrets(client *http.Client, repo ghrepo.Interface, app shared.App) ([]Secret, error) {
311 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), string(app), "secrets")

Callers 1

listRunFunction · 0.85

Calls 5

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

Tested by

no test coverage detected