File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,10 @@ func validateUpdateTaskActions(checklists []UpdateChecklist) error {
531
531
for _ , checklist := range checklists {
532
532
for _ , item := range checklist .Items {
533
533
if taskActions := item .TaskActions ; taskActions != nil {
534
+ // Limit task actions to 10
535
+ if len (* taskActions ) > 10 {
536
+ return errors .Errorf ("playbook cannot have more than 10 task actions" )
537
+ }
534
538
for _ , ta := range * taskActions {
535
539
if err := app .ValidateTrigger (ta .Trigger ); err != nil {
536
540
return err
Original file line number Diff line number Diff line change @@ -264,6 +264,11 @@ func validatePreAssignment(pb app.Playbook) error {
264
264
// validateTaskActions validates the taskactions in the given checklist
265
265
// NOTE: Any changes to this function must be made to function 'validateUpdateTaskActions' for the GraphQL endpoint.
266
266
func validateTaskActions (taskActions []app.TaskAction ) error {
267
+ // Limit task actions to 10
268
+ if len (taskActions ) > 10 {
269
+ return errors .Errorf ("playbook cannot have more than 10 task actions" )
270
+ }
271
+
267
272
for _ , ta := range taskActions {
268
273
if err := app .ValidateTrigger (ta .Trigger ); err != nil {
269
274
return err
You can’t perform that action at this time.
0 commit comments