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

Function getEnvPubKey

pkg/cmd/secret/set/http.go:67–73  ·  view source on GitHub ↗
(client *api.Client, repo ghrepo.Interface, envName string)

Source from the content-addressed store, hash-verified

65}
66
67func getEnvPubKey(client *api.Client, repo ghrepo.Interface, envName string) (*PubKey, error) {
68 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "environments", envName, "secrets", "public-key")
69 if err != nil {
70 return nil, err
71 }
72 return getPubKey(client, repo.RepoHost(), u)
73}
74
75func putSecret(client *api.Client, host string, path safeurl.SafeURL, payload interface{}) error {
76 payloadBytes, err := json.Marshal(payload)

Callers 1

setRunFunction · 0.85

Calls 5

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

Tested by

no test coverage detected