From 4597c7754230b05b65043c162861389897d920dd Mon Sep 17 00:00:00 2001 From: Eric White Date: Mon, 11 Jan 2021 15:02:12 -0500 Subject: [PATCH] Fix bitbucket 7 --- lib/bumper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)