chiark
/
gitweb
/
~cjwatson
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd9196c
)
m.gh: shorten the commit link title to 7 chars of the SHA-1.
author
Vladimír Vondruš
<mosra@centrum.cz>
Mon, 11 Sep 2017 11:22:00 +0000
(13:22 +0200)
committer
Vladimír Vondruš
<mosra@centrum.cz>
Tue, 12 Sep 2017 10:06:26 +0000
(12:06 +0200)
pelican-plugins/m/gh.py
patch
|
blob
|
history
diff --git
a/pelican-plugins/m/gh.py
b/pelican-plugins/m/gh.py
index 9db3bccdea5dbb04c18eda05649bebce02224526..6b086a0c047da066eb54bcb18e25950a6c19c07d 100644
(file)
--- 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)