git ssb

10+

Matt McKegg / patchwork



Commit 996cb9ffec97abd3bf8391f3a15e462d01fd663d

show git commit message summary on hover mini-message

Matt McKegg committed on 11/4/2016, 4:23:06 AM
Parent: b2886f60b5b31141643c0ea134c62b9e8e0db8e2

Files changed

modules/git-mini-messages.jschanged
modules/git-mini-messages.jsView
@@ -6,9 +6,9 @@
66 exports.message_content = exports.message_content_mini = function (msg, sbot) {
77 if (msg.value.content.type === 'git-update') {
88 var commits = msg.value.content.commits || []
99 return [
10- h('a', {href: `#${msg.key}`}, [
10 + h('a', {href: `#${msg.key}`, title: commitSummary(commits)}, [
1111 'pushed',
1212 when(commits, [' ', pluralizeCommits(commits)])
1313 ]),
1414 ' to ',
@@ -19,4 +19,8 @@
1919
2020 function pluralizeCommits (commits) {
2121 return when(commits.length === 1, '1 commit', `${commits.length} commits`)
2222 }
23 +
24 +function commitSummary (commits) {
25 + return commits.map(commit => `- ${commit.title}`).join('\n')
26 +}

Built with git-ssb-web