aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook')
-rw-r--r--services/webhook/webhook.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/services/webhook/webhook.go b/services/webhook/webhook.go
index e0e8fa2fc1..b4609e8a51 100644
--- a/services/webhook/webhook.go
+++ b/services/webhook/webhook.go
@@ -137,14 +137,8 @@ func PrepareWebhook(ctx context.Context, w *webhook_model.Webhook, event webhook
return nil
}
- for _, e := range w.EventCheckers() {
- if event == e.Type {
- if !e.Has() {
- return nil
- }
-
- break
- }
+ if !w.HasEvent(event) {
+ return nil
}
// Avoid sending "0 new commits" to non-integration relevant webhooks (e.g. slack, discord, etc.).