diff --git a/lib/modules/platform/bitbucket/comments.ts b/lib/modules/platform/bitbucket/comments.ts index b725e1ad04d79bfb8f33e5e4d8a516b1a988fc8a..ddb4916cf53a46a9927308ddd844fcc9fcf1846c 100644 --- a/lib/modules/platform/bitbucket/comments.ts +++ b/lib/modules/platform/bitbucket/comments.ts @@ -95,6 +95,10 @@ export async function ensureComment({ } }); } + + // sanitize any language that isn't supported by Bitbucket Cloud + body = sanitizeCommentBody(body); + if (!commentId) { await addComment(config, prNo, body); logger.info( @@ -146,3 +150,10 @@ export async function ensureCommentRemoval( logger.warn({ err }, 'Error ensuring comment removal'); } } + +function sanitizeCommentBody(body: string): string { + return body.replace( + 'checking the rebase/retry box above', + 'renaming this PR to start with "rebase!"' + ); +} diff --git a/lib/modules/platform/bitbucket/index.ts b/lib/modules/platform/bitbucket/index.ts index 589557487c42d6b19870ffcd6c985ca19d01f5ed..2b547488a6a3ae5960d6cbf9b418e2a4a73a9c78 100644 --- a/lib/modules/platform/bitbucket/index.ts +++ b/lib/modules/platform/bitbucket/index.ts @@ -484,7 +484,7 @@ export function massageMarkdown(input: string): string { return smartTruncate(input, 50000) .replace( 'you tick the rebase/retry checkbox', - 'rename PR to start with "rebase!"' + 'by renaming this PR to start with "rebase!"' ) .replace(regEx(/<\/?summary>/g), '**') .replace(regEx(/<\/?details>/g), '') diff --git a/lib/workers/repository/update/branch/handle-existing.ts b/lib/workers/repository/update/branch/handle-existing.ts index b378ededb8d4b8373b8e3c5bd3b197c1fe20a2df..341807948514701dc0fb9ddc503b542e043ed1a5 100644 --- a/lib/workers/repository/update/branch/handle-existing.ts +++ b/lib/workers/repository/update/branch/handle-existing.ts @@ -62,7 +62,7 @@ export async function handleModifiedPr( const editedPrCommentTopic = 'Edited/Blocked Notification'; const content = - 'Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.\n' + + 'Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.\n\n' + 'You can manually request rebase by checking the rebase/retry box above.\n\n' + emojify(' :warning: **Warning**: custom changes will be lost.');