From 18b27c256e7b5e82e5e4000e8abdfd4ebd7093a2 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 1 Feb 2020 00:23:41 +0000 Subject: check git-show-private *after* we have unfiltered_targets --- modules/git_webhooks/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index aa4572cd..dbedff95 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -85,10 +85,6 @@ class Module(ModuleManager.BaseModule): channel = server.channels.get(channel_name) hooks = channel.get_setting("git-webhooks", {}) - if is_private and not channel.get_setting( - PRIVATE_SETTING_NAME, False): - continue - if hooks: found_hook = self._find_hook( full_name_lower, repo_username_lower, @@ -104,6 +100,10 @@ class Module(ModuleManager.BaseModule): repo_hooked = bool(unfiltered_targets) targets = [] for server, channel, hook in unfiltered_targets: + if is_private and not channel.get_setting( + PRIVATE_SETTING_NAME, False): + continue + if (branch and hook["branches"] and not branch in hook["branches"]): -- cgit v1.3.1-10-gc9f91