From 6fbbcace66125578ca70f6b2e2f88ae72f19b9f8 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 18 Nov 2018 10:20:16 +0000 Subject: Make branch names in commit notifications blueified --- modules/github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/github.py b/modules/github.py index 4368d476..f48d86c4 100644 --- a/modules/github.py +++ b/modules/github.py @@ -111,7 +111,8 @@ class Module(ModuleManager.BaseModule): def push(self, event, full_name, data): outputs = [] - branch = data["ref"].split("/", 2)[2] + branch = utils.irc.color(data["ref"].split("/", 2)[2], + utils.consts.BLUE) if len(data["commits"]) <= 3: for commit in data["commits"]: id = self._short_hash(commit["id"]) @@ -127,7 +128,6 @@ class Module(ModuleManager.BaseModule): outputs.append("[%s/%s/%s files] commit by %s to %s: %s - %s" % (added, removed, modified, author, branch, message, url)) else: - branch = data["ref"].split("/", 2)[2] first_id = self._short_hash(data["before"]) last_id = self._short_hash(data["commits"][-1]["id"]) pusher = utils.irc.bold(data["pusher"]["name"]) -- cgit v1.3.1-10-gc9f91