1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 13:09:23 -05:00
forgejo/routers/api/v1/org
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
..
action.go refactor(API): refactor secret creation and update functionality (#26751) 2023-08-28 13:08:19 +08:00
avatar.go Add API for changing Avatars (#25369) 2023-06-29 23:22:55 +00:00
hook.go Add user webhooks (#21563) 2023-03-10 08:28:32 -06:00
label.go Allow to archive labels (#26478) 2023-08-14 11:56:14 +02:00
member.go Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
org.go Allow Organisations to have a E-Mail (#25082) 2023-07-25 08:26:27 +00:00
team.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00