From 23de934a1ece39982450875528aac22356b29553 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Fri, 21 Mar 2025 18:34:59 +0100 Subject: [PATCH] add branches-ignore to workflow_run --- modules/actions/workflows.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index 70d8de4687..9279da9ef0 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -738,6 +738,14 @@ func matchWorkflowRunEvent(payload *api.WorkflowRunPayload, evt *jobparser.Event if !workflowpattern.Skip(patterns, []string{payload.WorkflowRun.HeadBranch}, &workflowpattern.EmptyTraceWriter{}) { matchTimes++ } + case "branches-ignore": + patterns, err := workflowpattern.CompilePatterns(vals...) + if err != nil { + break + } + if !workflowpattern.Filter(patterns, []string{payload.WorkflowRun.HeadBranch}, &workflowpattern.EmptyTraceWriter{}) { + matchTimes++ + } default: log.Warn("package event unsupported condition %q", cond) }