From fcbb530b9e7794b9b712076adaec1e209e79af65 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 23 Jan 2019 08:50:14 +0000 Subject: [PATCH] Don't throw an exception when we get the kind of format of `ref` the `create` event gives (only repo name, not `"refs/head/repo"`) (github) --- modules/github/module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/github/module.py b/modules/github/module.py index 7766c18d..6085face 100644 --- a/modules/github/module.py +++ b/modules/github/module.py @@ -250,7 +250,10 @@ class Module(ModuleManager.BaseModule): branch = None if "ref" in data: - branch = data["ref"].split("/", 2)[2] + if "/" in data["ref"]: + branch = data["ref"].split("/", 2)[2] + else: + branch = data["ref"] hooks = self.bot.database.channel_settings.find_by_setting( "github-hooks")