This reverts commit 523751dc82
.
This commit is contained in:
parent
523751dc82
commit
704b65e012
10 changed files with 139 additions and 1687 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue