Skip to content

Commit

Permalink
gen-changelog: Support multiple credits
Browse files Browse the repository at this point in the history
  • Loading branch information
iarna committed Feb 19, 2016
1 parent 27c812a commit 6cbd7af
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}))`)
}
Expand All @@ -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: @(.*)/)) {
Expand Down

0 comments on commit 6cbd7af

Please sign in to comment.