-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): enhance Actions Secrets Management API for repository #30656
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
GiteaBot
added
the
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
label
Apr 23, 2024
pull-request-size
bot
added
the
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
label
Apr 23, 2024
github-actions
bot
added
modifies/api
This PR adds API routes or modifies them
modifies/go
Pull requests that update Go code
labels
Apr 23, 2024
lunny
approved these changes
Apr 23, 2024
GiteaBot
added
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
and removed
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
labels
Apr 23, 2024
It's better to have integration tests. |
- Remove owner variable and direct owner ID reference in `ListActionsSecrets` function. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Add a new test case for listing repository secrets in the API integration tests Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Refactor API routing for actions, secrets, variables, and runners into a new `actionsGroup` function - Introduce a new `actionAPI` struct to encapsulate action-related API functions Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
wxiaoguang
reviewed
Apr 23, 2024
wxiaoguang
reviewed
Apr 24, 2024
- 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>
pull-request-size
bot
added
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
and removed
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
labels
Apr 24, 2024
lunny
reviewed
Apr 24, 2024
wxiaoguang
approved these changes
Apr 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
GiteaBot
added
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
and removed
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
labels
Apr 24, 2024
- Update method receiver from `*Action` to `Action` - Update method signatures to remove receiver argument - Update swagger operation comments to reflect changes Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Change the expected status from `http.StatusNotFound` to `http.StatusMethodNotAllowed` in the APIRepoSecrets test. Signed-off-by: appleboy <appleboy.tw@gmail.com>
lunny
reviewed
Apr 25, 2024
appleboy
commented
Apr 25, 2024
appleboy
commented
Apr 25, 2024
lunny
approved these changes
Apr 26, 2024
lunny
added
the
reviewed/wait-merge
This pull request is part of the merge queue. It will be merged soon.
label
Apr 26, 2024
GiteaBot
removed
the
reviewed/wait-merge
This pull request is part of the merge queue. It will be merged soon.
label
Apr 26, 2024
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Apr 26, 2024
* giteaofficial/main: feat(api): enhance Actions Secrets Management API for repository (go-gitea#30656) Fix code search input for different views (go-gitea#30678) Fix incorrect object id hash function (go-gitea#30708) Add route handler info for debugging purpose (go-gitea#30705) Bump htmx version to 1.9.12 (go-gitea#30711)
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Apr 27, 2024
* origin/main: Replace deprecated `math/rand` functions (go-gitea#30733) Make Ctrl+Enter work for issue/comment edit (go-gitea#30720) Rename migration package name for 1.22-rc1 (go-gitea#30730) Issue card improvements (go-gitea#30687) Don't show loading indicators when refreshing the system status (go-gitea#30712) Add some tests to clarify the "must-change-password" behavior (go-gitea#30693) Prevent allow/reject reviews on merged/closed PRs (go-gitea#30686) Update JS dependencies (go-gitea#30713) Improve diff stats bar (go-gitea#30669) Remove unused parameter for some functions in `services/mirror` (go-gitea#30724) Update misspell to 0.5.1 and add `misspellings.csv` (go-gitea#30573) Suppress browserslist warning in webpack target (go-gitea#30571) [skip ci] Updated translations via Crowdin Diff color enhancements, add line number background (go-gitea#30670) feat(api): enhance Actions Secrets Management API for repository (go-gitea#30656) Fix code search input for different views (go-gitea#30678) Fix incorrect object id hash function (go-gitea#30708)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
modifies/api
This PR adds API routes or modifies them
modifies/go
Pull requests that update Go code
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ListActionsSecrets
function to retrieve action secrets from the database/repos/{owner}/{repo}/actions/secrets
endpointactions
package import and define new routes for actions, secrets, variables, and runners inapi.go
.Action
struct methods inorg/action.go
andrepo/action.go
.actionAPI
struct and related functions, replacing them withNewAction()
calls.variables.go
toaction.go
inorg
directory.runners.go
andsecrets.go
in bothorg
andrepo
directories, consolidating their content intoaction.go
.org/action.go
.API
interface inservices/actions/interface.go
for action-related methods.Action
struct inrepo/action.go
.