diff options
| -rw-r--r-- | modules/github.py | 6 |
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) |
