From 42e2596c9bd30b69882f8f7d3258bd95e25f4718 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 8 Feb 2019 23:01:45 +0000 Subject: [PATCH] Return semi-helpful information to github webhooks (github) --- modules/github/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/github/__init__.py b/modules/github/__init__.py index 2df058cc..55280ab3 100644 --- a/modules/github/__init__.py +++ b/modules/github/__init__.py @@ -306,7 +306,10 @@ class Module(ModuleManager.BaseModule): targets.append([server, channel]) if not targets: - return "" if repo_hooked else None + if not repo_hooked: + return None + else: + return {"state": "success", "deliveries": 0} outputs = None if github_event == "push": @@ -353,7 +356,7 @@ class Module(ModuleManager.BaseModule): hide_prefix=channel.get_setting( "github-hide-prefix", False)) - return "" + return {"state": "success", "deliveries": len(targets)} def _prevent_highlight(self, channel, s): for user in channel.users: