Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541)

This reverts commit 523751dc82.
This commit is contained in:
wxiaoguang 2025-02-10 17:44:42 +08:00 committed by GitHub
parent 523751dc82
commit 704b65e012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 139 additions and 1687 deletions

View file

@ -915,21 +915,6 @@ func Routes() *web.Router {
})
}
addActionsWorkflowRoutes := func(
m *web.Router,
actw actions.WorkflowAPI,
) {
m.Group("/actions", func() {
m.Group("/workflows", func() {
m.Get("", reqToken(), actw.ListRepositoryWorkflows)
m.Get("/{workflow_id}", reqToken(), actw.GetWorkflow)
m.Put("/{workflow_id}/disable", reqToken(), reqRepoWriter(unit.TypeActions), actw.DisableWorkflow)
m.Post("/{workflow_id}/dispatches", reqToken(), reqRepoWriter(unit.TypeActions), bind(api.CreateActionWorkflowDispatch{}), actw.DispatchWorkflow)
m.Put("/{workflow_id}/enable", reqToken(), reqRepoWriter(unit.TypeActions), actw.EnableWorkflow)
}, context.ReferencesGitRepo(), reqRepoReader(unit.TypeActions))
})
}
m.Group("", func() {
// Miscellaneous (no scope required)
if setting.API.EnableSwagger {
@ -1175,10 +1160,6 @@ func Routes() *web.Router {
reqOwner(),
repo.NewAction(),
)
addActionsWorkflowRoutes(
m,
repo.NewActionWorkflow(),
)
m.Group("/hooks/git", func() {
m.Combo("").Get(repo.ListGitHooks)
m.Group("/{id}", func() {