re-add lost git_webhook branch filtering

This commit is contained in:
jesopo 2019-10-25 11:29:27 +01:00
parent 39d14102f9
commit 6a2e4f70df

View file

@ -96,6 +96,11 @@ class Module(ModuleManager.BaseModule):
repo_hooked = bool(unfiltered_targets) repo_hooked = bool(unfiltered_targets)
targets = [] targets = []
for server, channel, hook in unfiltered_targets: for server, channel, hook in unfiltered_targets:
if (branch and
hook["branches"] and
not branch in hook["branches"]):
continue
events = [] events = []
for hooked_event in hook["events"]: for hooked_event in hook["events"]:
events.append(handler.event_categories(hooked_event)) events.append(handler.event_categories(hooked_event))