forgejo/modules/structs
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
..
activity.go
activitypub.go
admin_user.go
attachment.go
commit_status.go
commit_status_test.go
cron.go
doc.go
fork.go
git_blob.go
git_hook.go
hook.go
issue.go
issue_comment.go
issue_label.go
issue_milestone.go
issue_reaction.go
issue_stopwatch.go
issue_test.go
issue_tracked_time.go
lfs_lock.go
mirror.go
miscellaneous.go
nodeinfo.go
notifications.go
org.go
org_member.go
org_team.go
package.go
pull.go
pull_review.go
release.go add Upload URL to release API (#26663) 2023-08-24 10:36:10 +00:00
repo.go
repo_branch.go
repo_collaborator.go
repo_commit.go
repo_file.go
repo_key.go
repo_note.go
repo_refs.go
repo_tag.go
repo_topic.go
repo_tree.go
repo_watch.go
repo_wiki.go
secret.go refactor(API): refactor secret creation and update functionality (#26751) 2023-08-28 13:08:19 +08:00
settings.go
status.go
task.go
user.go
user_app.go
user_email.go
user_gpgkey.go
user_key.go
visible_type.go