diff options
| author | 2020-02-01 00:23:41 +0000 | |
|---|---|---|
| committer | 2020-02-01 00:23:41 +0000 | |
| commit | 18b27c256e7b5e82e5e4000e8abdfd4ebd7093a2 (patch) | |
| tree | 3b28b44e6a028b84a64d894ff1e790fae0b1be8c /modules/git_webhooks/__init__.py | |
| parent | Revert "support gitea respository["private"] as well as project["visibility_l... (diff) | |
| signature | ||
check git-show-private *after* we have unfiltered_targets
Diffstat (limited to 'modules/git_webhooks/__init__.py')
| -rw-r--r-- | modules/git_webhooks/__init__.py | 8 |
1 files 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"]): |
