diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-29 11:15:52 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-29 11:15:52 -1000 |
commit | 9e859f9fe19da67e9688bd4310bd2bae75b3d5c1 (patch) | |
tree | 9aca1ec106281fc43f1d1d373779b66929088e10 /lib | |
parent | 31dc9d1e415444f27de5e99d48b1809e27be5a6c (diff) | |
download | patchfoo-9e859f9fe19da67e9688bd4310bd2bae75b3d5c1.tar.gz patchfoo-9e859f9fe19da67e9688bd4310bd2bae75b3d5c1.zip |
Linkify git tags in git-update messages
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 72b8015..5b32fdd 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -498,8 +498,11 @@ RenderMsg.prototype.gitUpdate = function (cb) { })) : '', Array.isArray(self.c.tags) ? h('ul', self.c.tags.map(function (tag) { + var path = '/git/tag/' + encodeURIComponent(tag.sha1) + + '?msg=' + encodeURIComponent(self.msg.key) return h('li', - h('code', String(tag.sha1).substr(0, 8)), ' ', + h('a', {href: self.render.toUrl(path)}, + h('code', String(tag.sha1).substr(0, 8))), ' ', 'tagged ', String(tag.type), ' ', h('code', String(tag.object).substr(0, 8)), ' ', String(tag.tag) |