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)
This commit is contained in:
parent
e45b72356c
commit
fcbb530b9e
1 changed files with 4 additions and 1 deletions
|
@ -250,7 +250,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
branch = None
|
branch = None
|
||||||
if "ref" in data:
|
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(
|
hooks = self.bot.database.channel_settings.find_by_setting(
|
||||||
"github-hooks")
|
"github-hooks")
|
||||||
|
|
Loading…
Reference in a new issue