diff options
author | Rebecca Turner <me@re-becca.org> | 2016-02-19 03:25:13 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-02-19 05:35:42 +0300 |
commit | 6cbd7afff5c2383e61b8217eaf5c6d60d4f978f2 (patch) | |
tree | e88808194e3ffa22ee5a45c724305b7774af6eb2 /scripts | |
parent | 27c812ae5debd2206d8963121e4beb761e344ffe (diff) |
gen-changelog: Support multiple credits
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/changelog.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/changelog.js b/scripts/changelog.js index ae3ba5a6a..35685ffc6 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: @(.*)/)) { |