summaryrefslogtreecommitdiffstats
path: root/services/webhook/webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook/webhook.go')
-rw-r--r--services/webhook/webhook.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/webhook/webhook.go b/services/webhook/webhook.go
index 7b6bc555f7..87f28a5cdc 100644
--- a/services/webhook/webhook.go
+++ b/services/webhook/webhook.go
@@ -120,6 +120,11 @@ func checkBranch(w *models.Webhook, branch string) bool {
}
func prepareWebhook(w *models.Webhook, repo *models.Repository, event models.HookEventType, p api.Payloader) error {
+ // Skip sending if webhooks are disabled.
+ if setting.DisableWebhooks {
+ return nil
+ }
+
for _, e := range w.EventCheckers() {
if event == e.Type {
if !e.Has() {