diff --git a/commit-stream.js b/commit-stream.js index 7c13b72..2ca96c2 100644 --- a/commit-stream.js +++ b/commit-stream.js @@ -31,7 +31,7 @@ function commitStream (ghUser, ghProject) { if (!commit.reviewers) commit.reviewers = [] commit.reviewers.push({ name: m[1], email: m[2] }) - } else if (m = line.match(/^\s+PR(?:[- ]?URL)?:?\s*(.+)\s*$/i)) { + } else if (m = line.match(/^\s+PR(?:[- ]?URL)?:?\s*(.+)\s*$/)) { commit.prUrl = m[1] if (ghUser && ghProject && (m = commit.prUrl.match(/^\s*#?(\d+)\s*$/))) { commit.prUrl = 'https://github.com/' + ghUser + '/' + ghProject + '/pull/' + m[1] diff --git a/test.js b/test.js index a159757..38ef60f 100644 --- a/test.js +++ b/test.js @@ -18,6 +18,19 @@ test('current plain commit log', function (t) { t.ok(list && list.length > 1, 'got a list') + t.deepEqual(list[list.length - 9], { + author : { email: 'ralphtheninja@riseup.net', name: 'Lars-Magnus Skog' } + , description : [ + 'Fixes: https://github.com/rvagg/changelog-maker/issues/35' + ] + , ghIssue : 1 + , ghProject : 'commit-stream' + , ghUser : 'rvagg' + , prUrl : 'https://github.com/rvagg/commit-stream/pulls/1' + , sha : '8c4855ec384d004cadf81c2f0659fde7c380f4a9' + , summary : 'process: this should not match PR-URL' + }, 'got correct ninth commit') + t.deepEqual(list[list.length - 4], { author: { email: 'rod@vagg.org', name: 'Rod Vagg' } , sha: 'f92b93c3c7175b07f847dd45058b121cea6b3a20'