From 00472915a4fb29399109ec9c088ab1e6a3f9b0ec Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 14 Sep 2017 08:46:07 -1000 Subject: Render npm-packages --- lib/render-msg.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'lib/render-msg.js') diff --git a/lib/render-msg.js b/lib/render-msg.js index e9fc413..2e58610 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -254,6 +254,7 @@ RenderMsg.prototype.message = function (cb) { case 'mutual/credit': return this.mutualCredit(cb) case 'mutual/account': return this.mutualAccount(cb) case 'npm-publish': return this.npmPublish(cb) + case 'npm-packages': return this.npmPackages(cb) default: return this.object(cb) } } @@ -569,13 +570,16 @@ RenderMsg.prototype.gitUpdate = function (cb) { h('code', String(tag.sha1).substr(0, 8))), ' ', 'tagged ', String(tag.type), ' ', h('code', String(tag.object).substr(0, 8)), ' ', - String(tag.tag) + String(tag.tag), + tag.title ? [': ', self.linkify(String(tag.title).trim()), ' '] : '', + tag.body ? self.render.gitCommitBody(tag.body) : '' ) })) : '', self.c.commits_more ? h('div', '+ ' + self.c.commits_more + ' more commits') : '', self.c.tags_more ? h('div', - '+ ' + self.c.tags_more + ' more tags') : '' + '+ ' + self.c.tags_more + ' more tags') : '', + self.render.npmPackageMentions(self.c.mentions) ), cb) }) } @@ -943,6 +947,13 @@ RenderMsg.prototype.npmPublish = function (cb) { }) } +RenderMsg.prototype.npmPackages = function (cb) { + var self = this + self.wrap([ + self.render.npmPackageMentions(self.c.mentions) + ], cb) +} + RenderMsg.prototype.npmPublishTitle = function (cb) { var pkg = this.c.meta || {} var name = pkg.name || pkg._id || '?' -- cgit v1.2.3