diff --git a/lib/platform/bitbucket/index.ts b/lib/platform/bitbucket/index.ts index c60028a1a0caf58d9dfb9e564d6b06a6d02a5617..2bd1637ae433710f4a4c40be6782d8d152a613cb 100644 --- a/lib/platform/bitbucket/index.ts +++ b/lib/platform/bitbucket/index.ts @@ -540,6 +540,7 @@ export async function getPr(prNo: number) { const commits = await utils.accumulateValues(pr.links.commits.href); if (commits.length === 1) { res.canRebase = true; + res.canMerge = true; } } if (await branchExists(pr.source.branch.name)) { diff --git a/test/platform/bitbucket/__snapshots__/index.spec.ts.snap b/test/platform/bitbucket/__snapshots__/index.spec.ts.snap index 165aacf17d72b12d716b9758f380c1906eac0a84..ced5c899ec9d1c995ff552111cd3c62c8415cf63 100644 --- a/test/platform/bitbucket/__snapshots__/index.spec.ts.snap +++ b/test/platform/bitbucket/__snapshots__/index.spec.ts.snap @@ -161,6 +161,7 @@ exports[`platform/bitbucket getBranchPr() bitbucket finds PR for branch 1`] = ` Object { "body": "summary", "branchName": "branch", + "canMerge": true, "canRebase": true, "createdAt": "2018-07-02T07:02:25.275030+00:00", "displayNumber": "Pull Request #5", @@ -176,6 +177,7 @@ exports[`platform/bitbucket getPr() exists 1`] = ` Object { "body": "summary", "branchName": "branch", + "canMerge": true, "canRebase": true, "createdAt": "2018-07-02T07:02:25.275030+00:00", "displayNumber": "Pull Request #5",