From be77188e71baafbb50558082937c2bd776115c6f Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 14 Mar 2019 13:58:42 +0000 Subject: Don't use short/coloured hash for shortened urls (github) --- modules/github/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/github/__init__.py') diff --git a/modules/github/__init__.py b/modules/github/__init__.py index 55aff420..d233b896 100644 --- a/modules/github/__init__.py +++ b/modules/github/__init__.py @@ -463,14 +463,15 @@ class Module(ModuleManager.BaseModule): if len(data["commits"]) <= 3: for commit in data["commits"]: - id = utils.irc.color(self._short_hash(commit["id"]), COLOR_ID) + hash = commit["id"] + hash_colored = utils.irc.color(self._short_hash(hash), COLOR_ID) message = commit["message"].split("\n")[0].strip() author = utils.irc.bold(data["pusher"]["name"]) - url = self._short_url(COMMIT_URL % (full_name, id)) + url = self._short_url(COMMIT_URL % (full_name, hash)) outputs.append( "%s %spushed %s to %s: %s - %s" - % (author, forced, id, branch, message, url)) + % (author, forced, hash_colored, branch, message, url)) else: first_id = data["before"] last_id = data["commits"][-1]["id"] -- cgit v1.3.1-10-gc9f91