diff --git a/lib/platform/bitbucket/index.js b/lib/platform/bitbucket/index.js index 84dd11ddc9309a98aeed19424fc6faa7604ce002..3aed5de4083b239d862e5aec63814cb64d547eac 100644 --- a/lib/platform/bitbucket/index.js +++ b/lib/platform/bitbucket/index.js @@ -467,7 +467,7 @@ async function createPr( `/2.0/repositories/${config.repository}/pullrequests`, { body } )).body; - const pr = { id: prInfo.id, displayNumber: `Pull Request #${prInfo.id}` }; + const pr = { number: prInfo.id, displayNumber: `Pull Request #${prInfo.id}` }; // istanbul ignore if if (config.prList) { config.prList.push(pr); diff --git a/test/platform/bitbucket/index.spec.js b/test/platform/bitbucket/index.spec.js index daddc1e73b881699987a676c1d9b5a3ab8f6986e..8a00fd2e156522f81cc9fe534e808d64efbcbd31 100644 --- a/test/platform/bitbucket/index.spec.js +++ b/test/platform/bitbucket/index.spec.js @@ -323,8 +323,8 @@ describe('platform/bitbucket', () => { api.post.mockReturnValueOnce({ body: { id: 5 }, }); - const { id } = await bitbucket.createPr('branch', 'title', 'body'); - expect(id).toBe(5); + const { number } = await bitbucket.createPr('branch', 'title', 'body'); + expect(number).toBe(5); expect(api.post.mock.calls).toMatchSnapshot(); }); });