'ref' doesn't always come in "a/b/c" format for Gitea

This commit is contained in:
jesopo 2019-09-24 13:00:08 +01:00
parent 195381d2e5
commit 8d3a35e740

View file

@ -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"])