aboutsummaryrefslogtreecommitdiff
path: root/modules/github.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-18 10:25:32 +0000
committerGravatar jesopo2018-11-18 10:25:32 +0000
commit7b430a71b046c3244b504dfac97e10cfd6620d88 (patch)
tree1b30decb5e3c6cda3e8e0c922885b556708fa07d /modules/github.py
parentMake branch names in commit notifications blueified (diff)
signature
Don't 404 when a repo is hooked in to but a specific event type isn't listened
for (github.py)
Diffstat (limited to 'modules/github.py')
-rw-r--r--modules/github.py4
1 files changed, 3 insertions, 1 deletions
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":