From 9e859f9fe19da67e9688bd4310bd2bae75b3d5c1 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 29 May 2017 11:15:52 -1000 Subject: Linkify git tags in git-update messages --- lib/render-msg.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3