MCPcopy Create free account
hub / github.com/github/gh-aw / putRepoSecret

Function putRepoSecret

pkg/cli/secret_set_command.go:271–284  ·  view source on GitHub ↗
(client *api.RESTClient, owner, repo, name, keyID, encryptedValue string)

Source from the content-addressed store, hash-verified

269}
270
271func putRepoSecret(client *api.RESTClient, owner, repo, name, keyID, encryptedValue string) error {
272 path := fmt.Sprintf("repos/%s/%s/actions/secrets/%s", owner, repo, name)
273 payload := secretPayload{
274 EncryptedValue: encryptedValue,
275 KeyID: keyID,
276 }
277
278 body, err := json.Marshal(payload)
279 if err != nil {
280 return err
281 }
282
283 return client.Put(path, strings.NewReader(string(body)), nil)
284}

Callers 1

setRepoSecretFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected