diff options
Diffstat (limited to 'modules/actions/workflows.go')
-rw-r--r-- | modules/actions/workflows.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index 5cdd45b046..e7677edc59 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -565,18 +565,12 @@ func matchPullRequestReviewEvent(prPayload *api.PullRequestPayload, evt *jobpars actions = append(actions, "submitted", "edited") } - matched := false for _, val := range vals { if slices.ContainsFunc(actions, glob.MustCompile(val, '/').Match) { - matched = true - } - if matched { + matchTimes++ break } } - if matched { - matchTimes++ - } default: log.Warn("pull request review event unsupported condition %q", cond) } @@ -611,18 +605,12 @@ func matchPullRequestReviewCommentEvent(prPayload *api.PullRequestPayload, evt * actions = append(actions, "created", "edited") } - matched := false for _, val := range vals { if slices.ContainsFunc(actions, glob.MustCompile(val, '/').Match) { - matched = true - } - if matched { + matchTimes++ break } } - if matched { - matchTimes++ - } default: log.Warn("pull request review comment event unsupported condition %q", cond) } |