From 7b430a71b046c3244b504dfac97e10cfd6620d88 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 18 Nov 2018 10:25:32 +0000 Subject: [PATCH] Don't 404 when a repo is hooked in to but a specific event type isn't listened for (github.py) --- modules/github.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/github.py b/modules/github.py index f48d86c4..3fd06627 100644 --- a/modules/github.py +++ b/modules/github.py @@ -44,9 +44,11 @@ class Module(ModuleManager.BaseModule): "github-hook") targets = [] + repo_hooked = False for i, (server_id, channel_name, hooked_repos) in list( enumerate(hooks))[::-1]: if full_name in hooked_repos: + repo_hooked = True server = self.bot.get_server(server_id) if server and channel_name in server.channels: channel = server.channels.get(channel_name) @@ -56,7 +58,7 @@ class Module(ModuleManager.BaseModule): targets.append([server, channel]) if not targets: - return None + return True if repo_hooked else None outputs = None if github_event == "push":