From 8d3a35e7404d652ece4a3abdc3c74e6767b96dda Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 24 Sep 2019 13:00:08 +0100 Subject: [PATCH] 'ref' doesn't always come in "a/b/c" format for Gitea --- modules/git_webhooks/gitea.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git_webhooks/gitea.py b/modules/git_webhooks/gitea.py index 536925ac..321e82ec 100644 --- a/modules/git_webhooks/gitea.py +++ b/modules/git_webhooks/gitea.py @@ -124,7 +124,7 @@ class Gitea(object): def push(self, full_name, data): outputs = [] - branch = data["ref"].split("/", 2)[2] + branch = data["ref"].rpartition("/")[2] branch = utils.irc.color(branch, colors.COLOR_BRANCH) author = utils.irc.bold(data["pusher"]["login"])