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

Function putUserSecret

pkg/cmd/secret/set/http.go:117–128  ·  view source on GitHub ↗
(client *api.Client, host string, pk *PubKey, key, eValue string, repositoryIDs []int64)

Source from the content-addressed store, hash-verified

115}
116
117func putUserSecret(client *api.Client, host string, pk *PubKey, key, eValue string, repositoryIDs []int64) error {
118 payload := SecretPayload{
119 EncryptedValue: eValue,
120 KeyID: pk.ID,
121 Repositories: repositoryIDs,
122 }
123 path, err := safeurl.JoinPath("user", "codespaces", "secrets", key)
124 if err != nil {
125 return err
126 }
127 return putSecret(client, host, path, payload)
128}
129
130func putEnvSecret(client *api.Client, pk *PubKey, repo ghrepo.Interface, envName string, secretName, eValue string) error {
131 payload := SecretPayload{

Callers 1

setSecretFunction · 0.85

Calls 2

JoinPathFunction · 0.92
putSecretFunction · 0.85

Tested by

no test coverage detected