diff options
| author | 2019-10-25 11:29:27 +0100 | |
|---|---|---|
| committer | 2019-10-25 11:29:27 +0100 | |
| commit | 6a2e4f70dfadff66ee8586f14b4828385a455660 (patch) | |
| tree | 77366da181aa434eff591b1554e72a396ba95bae | |
| parent | support `channels` GET param for git webhooks, to denote target channels (diff) | |
| signature | ||
re-add lost git_webhook branch filtering
| -rw-r--r-- | modules/git_webhooks/__init__.py | 5 |
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)) |
