From 6cbd7afff5c2383e61b8217eaf5c6d60d4f978f2 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 18 Feb 2016 16:25:13 -0800 Subject: [PATCH] gen-changelog: Support multiple credits --- scripts/changelog.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/changelog.js b/scripts/changelog.js index ae3ba5a6a874f..35685ffc6031b 100644 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -53,7 +53,9 @@ function print_commit (c) { .replace(/\b#(\d+)\b/g, '[#$1](https://github.com/npm/npm/issues/$1)') console.log(msg) if (c.credit) { - console.log(` ([@${c.credit}](https://github.com/${c.credit}))`) + c.credit.forEach(function (credit) { + console.log(` ([@${credit}](https://github.com/${credit}))`) + }) } else { console.log(` ([@${c.author}](https://github.com/${c.author}))`) } @@ -80,7 +82,8 @@ function main () { } else if (m = line.match(/^PR-URL: (.*)/)) { commit.prurl = m[1] } else if (m = line.match(/^Credit: @(.*)/)) { - commit.credit = m[1] + if (!commit.credit) commit.credit = [] + commit.credit.push(m[1]) } else if (m = line.match(/^Fixes: #(.*)/)) { commit.fixes = m[1] } else if (m = line.match(/^Reviewed-By: @(.*)/)) {