Skip to content

Commit

Permalink
Merge pull request #173 from EWhite613/fix-bitbucket-7
Browse files Browse the repository at this point in the history
Fix bitbucket 7
  • Loading branch information
sophypal committed Jan 11, 2021
2 parents 2865e17 + 4597c77 commit b3f1dfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bumper.js
Expand Up @@ -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])
})
}

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit b3f1dfb

Please sign in to comment.