1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-14 05:42:35 +00:00
forgejo/routers/api/v1
Bo-Yi Wu 8cd46024fd
refactor(API): refactor secret creation and update functionality ()
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
..
activitypub Update tool dependencies, lock govulncheck and actionlint () 2023-07-09 11:58:06 +00:00
admin fix Missing 404 swagger response docs for /admin/users/{username} () 2023-07-24 10:48:44 +02:00
misc Refactor web package and context package () 2023-06-18 09:59:09 +02:00
notify Fix bugs related to notification endpoints () 2023-06-28 10:26:56 -04:00
org refactor(API): refactor secret creation and update functionality () 2023-08-28 13:08:19 +08:00
packages Add CRAN package registry () 2023-05-22 10:57:49 +08:00
repo Move modules/mirror to services () 2023-08-27 10:24:45 +08:00
settings Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
swagger refactor(API): refactor secret creation and update functionality () 2023-08-28 13:08:19 +08:00
user Remove db.DefaultContext in routers/ and cmd/ () 2023-07-23 23:47:27 -04:00
utils New webhook trigger for receiving Pull Request review requests () 2023-05-24 22:06:27 -04:00
api.go refactor(API): refactor secret creation and update functionality () 2023-08-28 13:08:19 +08:00
auth.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
auth_windows.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00