1
0
Fork 0
gitea/modules
Bo-Yi Wu 8cd46024fd
refactor(API): refactor secret creation and update functionality (#26751)
According to the GitHub API Spec:
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret

Merge the Create and Update secret into a single API.

- Remove the `CreateSecretOption` struct and replace it with
`CreateOrUpdateSecretOption` in `modules/structs/secret.go`
- Update the `CreateOrUpdateOrgSecret` function in
`routers/api/v1/org/action.go` to use `CreateOrUpdateSecretOption`
instead of `UpdateSecretOption`
- Remove the `CreateOrgSecret` function in
`routers/api/v1/org/action.go` and replace it with
`CreateOrUpdateOrgSecret`
- Update the Swagger documentation in
`routers/api/v1/swagger/options.go` and `templates/swagger/v1_json.tmpl`
to reflect the changes in the struct names and function names

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-08-28 13:08:19 +08:00
..
actions chore(actions): support cron schedule task (#26655) 2023-08-24 03:06:51 +00:00
activitypub Expanded minimum RSA Keylength to 3072 (#26604) 2023-08-28 00:53:16 +00:00
analyze
assetfs
auth
avatar
base
cache
charset
container
context Make web context initialize correctly for different cases (#26726) 2023-08-25 19:07:42 +08:00
csv
doctor
emoji
eventsource
generate
git Add merge files files to GetCommitFileStatus (#20515) 2023-08-24 10:03:49 +00:00
gitgraph
graceful
hcaptcha
highlight
hostmatcher
html
httpcache
httplib
indexer Fix counting and filtering on the dashboard page for issues (#26657) 2023-08-23 02:29:17 +00:00
issue/template
json
label
lfs
log
markup
mcaptcha
metrics
migration
nosql
notification Move `modules/mirror` to `services` (#26737) 2023-08-27 10:24:45 +08:00
options
packages Use docs.gitea.com instead of docs.gitea.io (#26739) 2023-08-27 11:59:12 +00:00
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Fix bug for ctx usage (#26762) 2023-08-28 04:06:47 +00:00
secret
session
setting Expanded minimum RSA Keylength to 3072 (#26604) 2023-08-28 00:53:16 +00:00
sitemap
ssh
storage Use correct minio error (#26634) 2023-08-21 16:20:11 +00:00
structs refactor(API): refactor secret creation and update functionality (#26751) 2023-08-28 13:08:19 +08:00
svg
sync
system
templates
test Make web context initialize correctly for different cases (#26726) 2023-08-25 19:07:42 +08:00
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util
validation
web
webhook