chiark / gitweb /
m.gh: shorten the commit link title to 7 chars of the SHA-1.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Sep 2017 11:22:00 +0000 (13:22 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 12 Sep 2017 10:06:26 +0000 (12:06 +0200)
pelican-plugins/m/gh.py

index 9db3bccdea5dbb04c18eda05649bebce02224526..6b086a0c047da066eb54bcb18e25950a6c19c07d 100644 (file)
@@ -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)