From dee60692689e70648488651ec89ba59e2b2eeebd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Sep 2017 13:22:00 +0200 Subject: [PATCH] m.gh: shorten the commit link title to 7 chars of the SHA-1. --- pelican-plugins/m/gh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican-plugins/m/gh.py b/pelican-plugins/m/gh.py index 9db3bccd..6b086a0c 100644 --- a/pelican-plugins/m/gh.py +++ b/pelican-plugins/m/gh.py @@ -13,7 +13,7 @@ def gh_internal(account, ref, title, link): elif '@' in ref: project, _, commit = ref.partition('@') url = base_url.format(account, project, "commit", commit) - if not title: title = link + if not title: title = account + "/" + project + "@" + commit[0:7] elif '$' in ref: project, _, branch = ref.partition('$') url = base_url.format(account, project, "tree", branch) -- 2.30.2