From eccfa6514f719772d5d1f0353993f7644469841f Mon Sep 17 00:00:00 2001 From: Maxime Brunet <max@brnt.mx> Date: Sat, 15 Jan 2022 12:59:38 -0800 Subject: [PATCH] feat(bitbucket-cloud): Use default PR merge message (#13567) * feat(bitbucket-cloud): Use default PR merge message * Update MergeRequestBody interface * Make message optional Co-authored-by: Michael Kriese <michael.kriese@visualon.de> --- .../bitbucket/__snapshots__/index.spec.ts.snap | 15 +++++---------- lib/platform/bitbucket/types.ts | 2 +- lib/platform/bitbucket/utils.ts | 1 - 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/platform/bitbucket/__snapshots__/index.spec.ts.snap b/lib/platform/bitbucket/__snapshots__/index.spec.ts.snap index 3d6b461911..3793afe6a7 100644 --- a/lib/platform/bitbucket/__snapshots__/index.spec.ts.snap +++ b/lib/platform/bitbucket/__snapshots__/index.spec.ts.snap @@ -1401,13 +1401,12 @@ Array [ Object { "body": Object { "close_source_branch": true, - "message": "auto merged", }, "headers": Object { "accept": "application/json", "accept-encoding": "gzip, deflate, br", "authorization": "Basic YWJjOjEyMw==", - "content-length": "52", + "content-length": "28", "content-type": "application/json", "host": "api.bitbucket.org", "user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", @@ -1435,13 +1434,12 @@ Array [ "body": Object { "close_source_branch": true, "merge_strategy": "fast_forward", - "message": "auto merged", }, "headers": Object { "accept": "application/json", "accept-encoding": "gzip, deflate, br", "authorization": "Basic YWJjOjEyMw==", - "content-length": "84", + "content-length": "60", "content-type": "application/json", "host": "api.bitbucket.org", "user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", @@ -1469,13 +1467,12 @@ Array [ "body": Object { "close_source_branch": true, "merge_strategy": "merge_commit", - "message": "auto merged", }, "headers": Object { "accept": "application/json", "accept-encoding": "gzip, deflate, br", "authorization": "Basic YWJjOjEyMw==", - "content-length": "84", + "content-length": "60", "content-type": "application/json", "host": "api.bitbucket.org", "user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", @@ -1502,13 +1499,12 @@ Array [ Object { "body": Object { "close_source_branch": true, - "message": "auto merged", }, "headers": Object { "accept": "application/json", "accept-encoding": "gzip, deflate, br", "authorization": "Basic YWJjOjEyMw==", - "content-length": "52", + "content-length": "28", "content-type": "application/json", "host": "api.bitbucket.org", "user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", @@ -1536,13 +1532,12 @@ Array [ "body": Object { "close_source_branch": true, "merge_strategy": "squash", - "message": "auto merged", }, "headers": Object { "accept": "application/json", "accept-encoding": "gzip, deflate, br", "authorization": "Basic YWJjOjEyMw==", - "content-length": "78", + "content-length": "54", "content-type": "application/json", "host": "api.bitbucket.org", "user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", diff --git a/lib/platform/bitbucket/types.ts b/lib/platform/bitbucket/types.ts index 9e3bb0c167..907cc4071c 100644 --- a/lib/platform/bitbucket/types.ts +++ b/lib/platform/bitbucket/types.ts @@ -2,6 +2,6 @@ export type BitbucketMergeStrategy = 'fast_forward' | 'merge_commit' | 'squash'; export interface MergeRequestBody { close_source_branch?: boolean; - message: string; + message?: string; merge_strategy?: BitbucketMergeStrategy; } diff --git a/lib/platform/bitbucket/utils.ts b/lib/platform/bitbucket/utils.ts index b68e42b63b..a77075053b 100644 --- a/lib/platform/bitbucket/utils.ts +++ b/lib/platform/bitbucket/utils.ts @@ -70,7 +70,6 @@ export function mergeBodyTransformer( ): MergeRequestBody { const body: MergeRequestBody = { close_source_branch: true, - message: 'auto merged', }; // The `auto` strategy will use the strategy configured inside Bitbucket. -- GitLab