From c2eb96882afcc6f27e7b62c5bd264bd57595c005 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 10 Mar 2019 10:31:32 +0000 Subject: [PATCH] show short commit hash in individual push messages (github) --- modules/github/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/github/__init__.py b/modules/github/__init__.py index 7f2aa9e3..55aff420 100644 --- a/modules/github/__init__.py +++ b/modules/github/__init__.py @@ -463,14 +463,14 @@ class Module(ModuleManager.BaseModule): if len(data["commits"]) <= 3: for commit in data["commits"]: - id = commit["id"] + id = utils.irc.color(self._short_hash(commit["id"]), 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)) outputs.append( - "%s %spushed to %s: %s - %s" - % (author, forced, branch, message, url)) + "%s %spushed %s to %s: %s - %s" + % (author, forced, id, branch, message, url)) else: first_id = data["before"] last_id = data["commits"][-1]["id"]