fix lint check, /actions/run use isAdmin permission

This commit is contained in:
pangliang 2023-11-23 12:24:49 +08:00
parent fbadf6f79e
commit 8eb79f3741
2 changed files with 2 additions and 2 deletions

View File

@ -706,7 +706,7 @@ func Run(ctx *context_module.Context) {
return
}
var dwf *actions.DetectedWorkflow = nil
var dwf *actions.DetectedWorkflow
for _, entry := range entries {
if entry.Name() == workflow {
content, err := actions.GetContentFromEntry(entry)

View File

@ -1352,7 +1352,7 @@ func registerRoutes(m *web.Route) {
m.Get("", actions.List)
m.Post("/disable", reqRepoAdmin, actions.DisableWorkflowFile)
m.Post("/enable", reqRepoAdmin, actions.EnableWorkflowFile)
m.Post("/run", reqRepoActionsWriter, actions.Run)
m.Post("/run", reqRepoAdmin, actions.Run)
m.Group("/runs/{run}", func() {
m.Combo("").