mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Enhance routers for the Actions runner operations (#33549)
- Find the runner before deleting - Move the main logic from `routers/web/repo/setting/runners.go` to `routers/web/shared/actions/runners.go`. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -467,11 +467,11 @@ func registerRoutes(m *web.Router) {
|
||||
|
||||
addSettingsRunnersRoutes := func() {
|
||||
m.Group("/runners", func() {
|
||||
m.Get("", repo_setting.Runners)
|
||||
m.Combo("/{runnerid}").Get(repo_setting.RunnersEdit).
|
||||
Post(web.Bind(forms.EditRunnerForm{}), repo_setting.RunnersEditPost)
|
||||
m.Post("/{runnerid}/delete", repo_setting.RunnerDeletePost)
|
||||
m.Post("/reset_registration_token", repo_setting.ResetRunnerRegistrationToken)
|
||||
m.Get("", shared_actions.Runners)
|
||||
m.Combo("/{runnerid}").Get(shared_actions.RunnersEdit).
|
||||
Post(web.Bind(forms.EditRunnerForm{}), shared_actions.RunnersEditPost)
|
||||
m.Post("/{runnerid}/delete", shared_actions.RunnerDeletePost)
|
||||
m.Post("/reset_registration_token", shared_actions.ResetRunnerRegistrationToken)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1147,7 +1147,7 @@ func registerRoutes(m *web.Router) {
|
||||
})
|
||||
})
|
||||
m.Group("/actions", func() {
|
||||
m.Get("", repo_setting.RedirectToDefaultSetting)
|
||||
m.Get("", shared_actions.RedirectToDefaultSetting)
|
||||
addSettingsRunnersRoutes()
|
||||
addSettingsSecretsRoutes()
|
||||
addSettingsVariablesRoutes()
|
||||
|
Reference in New Issue
Block a user