From 6a2e4f70dfadff66ee8586f14b4828385a455660 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 25 Oct 2019 11:29:27 +0100 Subject: [PATCH] re-add lost git_webhook branch filtering --- modules/git_webhooks/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index e75f4e39..7a1154fb 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -96,6 +96,11 @@ class Module(ModuleManager.BaseModule): repo_hooked = bool(unfiltered_targets) targets = [] for server, channel, hook in unfiltered_targets: + if (branch and + hook["branches"] and + not branch in hook["branches"]): + continue + events = [] for hooked_event in hook["events"]: events.append(handler.event_categories(hooked_event))