Skip to content

Commit

Permalink
gen-changelog: match npm.community urls in addition to github ones
Browse files Browse the repository at this point in the history
  • Loading branch information
iarna authored and zkat committed Aug 22, 2018
1 parent f86570d commit ee5066a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const log = execSync(`git log --reverse --pretty='format:%h %H%d %s (%aN)%n%b%n-
main()

function shortname (url) {
let matched = url.match(/https:\/\/github.com\/([^/]+\/[^/]+)\/(?:pull|issues)\/(\d+)/)
let matched = url.match(/https:\/\/github\.com\/([^/]+\/[^/]+)\/(?:pull|issues)\/(\d+)/)
|| url.match(/https:\/\/(npm\.community)\/t\/(\d+)/)
if (!matched) return false
let repo = matched[1]
let id = matched[2]
Expand Down

0 comments on commit ee5066a

Please sign in to comment.