0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-21 01:38:30 +02:00

add branches-ignore to workflow_run

This commit is contained in:
Christopher Homberger 2025-03-21 18:34:59 +01:00
parent c43cb79f95
commit 23de934a1e

View File

@ -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)
}