aboutsummaryrefslogtreecommitdiff
path: root/modules/github
diff options
context:
space:
mode:
Diffstat (limited to 'modules/github')
-rw-r--r--modules/github/module.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/github/module.py b/modules/github/module.py
index 6085face..7629af76 100644
--- a/modules/github/module.py
+++ b/modules/github/module.py
@@ -250,10 +250,7 @@ class Module(ModuleManager.BaseModule):
branch = None
if "ref" in data:
- if "/" in data["ref"]:
- branch = data["ref"].split("/", 2)[2]
- else:
- branch = data["ref"]
+ _, _, branch = data["ref"].rpartition("/")
hooks = self.bot.database.channel_settings.find_by_setting(
"github-hooks")