Skip to content

Commit

Permalink
changelog: update generator script
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Aug 2, 2018
1 parent fa54524 commit 0a53c10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ function shortname (url) {
}

function printCommit (c) {
console.log(`* [\`${c.shortid}\`](https://github.com/npm/npm/commit/${c.fullid})`)
console.log(`* [\`${c.shortid}\`](https://github.com/npm/cli/commit/${c.fullid})`)
if (c.fixes) {
let label = shortname(c.fixes)
if (label) {
console.log(` [${label}](${c.fixes})`)
} else {
console.log(` [#${c.fixes}](https://github.com/npm/npm/issues/${c.fixes})`)
console.log(` [npm.community#${c.fixes}](https://npm.community/t/${c.fixes})`)
}
} else if (c.prurl) {
let label = shortname(c.prurl)
Expand All @@ -55,8 +55,8 @@ function printCommit (c) {
.replace(/^(\s*[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2')
.replace(/\b([^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`')
// linkify commitids
.replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/npm/commit/$1)')
.replace(/\b#(\d+)\b/g, '[#$1](https://github.com/npm/npm/issues/$1)')
.replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/cli/commit/$1)')
.replace(/\b#(\d+)\b/g, '[#$1](https://npm.community/t/$1)')
console.log(msg)
if (c.credit) {
c.credit.forEach(function (credit) {
Expand Down

0 comments on commit 0a53c10

Please sign in to comment.