diff --git a/lib/bumper.js b/lib/bumper.js index d97d23c..5b0a559 100644 --- a/lib/bumper.js +++ b/lib/bumper.js @@ -243,7 +243,7 @@ class Bumper { getLastMergeCommitHash () { // Get the commit hash return this._getLastMergeCommit().then(mergeCommit => { - return Promise.resolve(mergeCommit.match(/(\w*) Merge pull request #/)[1]) + return Promise.resolve(mergeCommit.match(/(\w*) (Merge ){0,1}pull request #/i)[1]) }) } @@ -273,7 +273,7 @@ class Bumper { _getLastPr () { return this._getLastMergeCommit().then((mergeCommit) => { // Get the number from the PR commit - const prNumber = mergeCommit.match(/pull request #(\d*)/)[1] + const prNumber = mergeCommit.match(/pull request #(\d*)/i)[1] logger.log(`Fetching PR [${prNumber}]`) return this.vcs.getPr(prNumber) @@ -293,7 +293,7 @@ class Bumper { // The commit that represents the merging of the PR will include the text 'pull request #' so // we find that one const mergeCommit = __.find(commits, (commit) => { - return commit.match('pull request #') !== null + return commit.match(/pull request #/i) !== null }) return Promise.resolve(mergeCommit)