]> source.dussan.org Git - gitea.git/commit
feat(api): enhance Actions Secrets Management API for repository (#30656)
authorBo-Yi Wu <appleboy.tw@gmail.com>
Fri, 26 Apr 2024 13:11:49 +0000 (21:11 +0800)
committerGitHub <noreply@github.com>
Fri, 26 Apr 2024 13:11:49 +0000 (21:11 +0800)
commit852547d0dc70299589c7bf8d00ea462ed709b8e5
tree235003f72556874c6115ed21baca6ebecd74dacb
parent993736d838c36e26951b6cfea9c6a549958addd1
feat(api): enhance Actions Secrets Management API for repository (#30656)

- Add endpoint to list repository action secrets in API routes
- Implement `ListActionsSecrets` function to retrieve action secrets
from the database
- Update Swagger documentation to include the new
`/repos/{owner}/{repo}/actions/secrets` endpoint
- Add `actions` package import and define new routes for actions,
secrets, variables, and runners in `api.go`.
- Refactor action-related API functions into `Action` struct methods in
`org/action.go` and `repo/action.go`.
- Remove `actionAPI` struct and related functions, replacing them with
`NewAction()` calls.
- Rename `variables.go` to `action.go` in `org` directory.
- Delete `runners.go` and `secrets.go` in both `org` and `repo`
directories, consolidating their content into `action.go`.
- Update copyright year and add new imports in `org/action.go`.
- Implement `API` interface in `services/actions/interface.go` for
action-related methods.
- Remove individual action-related functions and replace them with
methods on the `Action` struct in `repo/action.go`.

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
routers/api/v1/api.go
routers/api/v1/org/action.go [new file with mode: 0644]
routers/api/v1/org/runners.go [deleted file]
routers/api/v1/org/secrets.go [deleted file]
routers/api/v1/org/variables.go [deleted file]
routers/api/v1/repo/action.go
routers/api/v1/repo/runners.go [deleted file]
services/actions/interface.go [new file with mode: 0644]
templates/swagger/v1_json.tmpl
tests/integration/api_repo_secrets_test.go