diff options
| author | 2019-03-14 13:58:42 +0000 | |
|---|---|---|
| committer | 2019-03-14 13:58:42 +0000 | |
| commit | be77188e71baafbb50558082937c2bd776115c6f (patch) | |
| tree | 852a587dbb093a09103e771d441b9124021347f8 /modules/github | |
| parent | Reload bot.conf and modules on SIGHUP (diff) | |
| signature | ||
Don't use short/coloured hash for shortened urls (github)
Diffstat (limited to 'modules/github')
| -rw-r--r-- | modules/github/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
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"] |
