aboutsummaryrefslogtreecommitdiff
path: root/modules/github.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-06 16:08:02 +0000
committerGravatar jesopo2018-11-06 16:08:02 +0000
commit0e2d2b268a101e3cccce057c9506d3df58ef6531 (patch)
tree2308cf4c2e6bbd3476d504a2c90e45932f94dfae /modules/github.py
parentif an issue comment is from a pull request, it's denoted by the presence of (diff)
signature
Handle github_event 'ping'
Diffstat (limited to 'modules/github.py')
-rw-r--r--modules/github.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/github.py b/modules/github.py
index b3276647..b72421d5 100644
--- a/modules/github.py
+++ b/modules/github.py
@@ -11,6 +11,10 @@ class Module(ModuleManager.BaseModule):
def github(self, event):
data = json.loads(event["data"])
+ github_event = event["headers"]["X-GitHub-Event"]
+ if github_event == "ping":
+ return True
+
full_name = data["repository"]["full_name"]
hooks = self.bot.database.channel_settings.find_by_setting(
"github-hook")
@@ -21,8 +25,6 @@ class Module(ModuleManager.BaseModule):
if not hooks:
return None
- github_event = event["headers"]["X-GitHub-Event"]
-
outputs = None
if github_event == "push":
outputs = self.push(event, full_name, data)