From 371d9bd9d62560fdbaea781882c43e71012cc696 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 19 Nov 2018 21:36:24 +0000 Subject: [PATCH] Only color branch name when it's not in the url --- modules/github.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/github.py b/modules/github.py index d79e9f31..bad397d6 100644 --- a/modules/github.py +++ b/modules/github.py @@ -212,11 +212,12 @@ class Module(ModuleManager.BaseModule): url)] def create(self, event, full_name, data): - ref = utils.irc.color(data["ref"], utils.consts.BLUE) + ref = data["ref"] + ref_color = utils.irc.color(ref, utils.consts.BLUE) type = data["ref_type"] sender = utils.irc.bold(data["sender"]["login"]) url = CREATE_URL % (full_name, ref) - return ["%s created a %s: %s - %s" % (sender, type, ref, url)] + return ["%s created a %s: %s - %s" % (sender, type, ref_color, url)] def delete(self, event, full_name, data): ref = data["ref"]