diff --git a/models/actions/run_job.go b/models/actions/run_job.go index d12748d554..93097cc449 100644 --- a/models/actions/run_job.go +++ b/models/actions/run_job.go @@ -20,7 +20,6 @@ import ( // MaxJobNumPerRun is the maximum number of jobs in a single run. // https://docs.github.com/en/actions/reference/limits#existing-system-limits -// TODO: check this limit when creating jobs const MaxJobNumPerRun = 256 // ActionRunJob represents a job of a run diff --git a/routers/web/web.go b/routers/web/web.go index 342c851f58..34164528f9 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -595,7 +595,6 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Group("", func() { m.Get("/authorize", web.Bind(forms.AuthorizationForm{}), auth.AuthorizeOAuth) m.Post("/grant", web.Bind(forms.GrantApplicationForm{}), auth.GrantApplicationOAuth) - // TODO manage redirection m.Post("/authorize", web.Bind(forms.AuthorizationForm{}), auth.AuthorizeOAuth) }, reqSignIn) diff --git a/services/actions/run.go b/services/actions/run.go index 82c9b17aec..6151ca3905 100644 --- a/services/actions/run.go +++ b/services/actions/run.go @@ -82,6 +82,10 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, content []byte return fmt.Errorf("parse workflow: %w", err) } + if len(jobs) > actions_model.MaxJobNumPerRun { + return fmt.Errorf("workflow has too many jobs (%d), maximum is %d", len(jobs), actions_model.MaxJobNumPerRun) + } + titleChanged := len(jobs) > 0 && jobs[0].RunName != "" if titleChanged { run.Title = util.EllipsisDisplayString(jobs[0].RunName, 255) diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 135b4da3a0..39ffdd44b1 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -81,7 +81,7 @@ {{ctx.Locale.Tr "admin.emails.change_email_header"}}