diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2023-08-24 10:07:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 02:07:00 +0000 |
commit | b62c8e7765a371600a300f62da96483a1ae0c731 (patch) | |
tree | 77e2f06e361039ba981bc7927ee9c4a1a6aa5af0 /modules/structs | |
parent | 7e30986667cc0c460a9fb38e32862e492fd4ca8d (diff) | |
download | gitea-b62c8e7765a371600a300f62da96483a1ae0c731.tar.gz gitea-b62c8e7765a371600a300f62da96483a1ae0c731.zip |
feat(API): update and delete secret for managing organization secrets (#26660)
- Add `UpdateSecret` function to modify org or user repo secret
- Add `DeleteSecret` function to delete secret from an organization
- Add `UpdateSecretOption` struct for updating secret options
- Add `UpdateOrgSecret` function to update a secret in an organization
- Add `DeleteOrgSecret` function to delete a secret in an organization
GitHub API
1. Update Org Secret:
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret
2. Delete Org Secret:
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#delete-an-organization-secret
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/secret.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/structs/secret.go b/modules/structs/secret.go index c707eb2278..52221b51f0 100644 --- a/modules/structs/secret.go +++ b/modules/structs/secret.go @@ -25,3 +25,12 @@ type CreateSecretOption struct { // Data of the secret to create Data string `json:"data" binding:"Required"` } + +// UpdateSecretOption options when updating secret +// swagger:model +type UpdateSecretOption struct { + // Data of the secret to update + // + // required: true + Data string `json:"data" binding:"Required"` +} |