aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git_webhooks/__init__.py')
-rw-r--r--modules/git_webhooks/__init__.py5
1 files changed, 5 insertions, 0 deletions
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))