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
|
||||
if "ref" in data:
|
||||
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")
|
||||
|
|
Loading…
Reference in a new issue