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

Function putRepoSecret

pkg/cmd/secret/set/http.go:142–152  ·  view source on GitHub ↗
(client *api.Client, pk *PubKey, repo ghrepo.Interface, secretName, eValue string, app shared.App)

Source from the content-addressed store, hash-verified

140}
141
142func putRepoSecret(client *api.Client, pk *PubKey, repo ghrepo.Interface, secretName, eValue string, app shared.App) error {
143 payload := SecretPayload{
144 EncryptedValue: eValue,
145 KeyID: pk.ID,
146 }
147 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), string(app), "secrets", secretName)
148 if err != nil {
149 return err
150 }
151 return putSecret(client, repo.RepoHost(), path, payload)
152}

Callers 1

setSecretFunction · 0.85

Calls 5

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

Tested by

no test coverage detected