aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks/__init__.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-25 11:29:27 +0100
committerGravatar jesopo2019-10-25 11:29:27 +0100
commit6a2e4f70dfadff66ee8586f14b4828385a455660 (patch)
tree77366da181aa434eff591b1554e72a396ba95bae /modules/git_webhooks/__init__.py
parentsupport `channels` GET param for git webhooks, to denote target channels (diff)
signature
re-add lost git_webhook branch filtering
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))