diff --git a/lib/workers/pr/index.ts b/lib/workers/pr/index.ts index 5aaef0796dade0..9fc7e586e968ca 100644 --- a/lib/workers/pr/index.ts +++ b/lib/workers/pr/index.ts @@ -15,8 +15,8 @@ import { getPrBody } from './body'; import { ChangeLogError } from './changelog'; import { codeOwnersForPr } from './code-owners'; -function noWhitespace(input: string): string { - return input.replace(/\r?\n|\r|\s/g, ''); +function noWhitespaceOrHeadings(input: string): string { + return input.replace(/\r?\n|\r|\s|#/g, ''); } function noLeadingAtSymbol(input: string): string { @@ -293,7 +293,8 @@ export async function ensurePr( existingPrBody = existingPrBody.trim(); if ( existingPr.title === prTitle && - noWhitespace(existingPrBody) === noWhitespace(prBody) + noWhitespaceOrHeadings(existingPrBody) === + noWhitespaceOrHeadings(prBody) ) { logger.debug(`${existingPr.displayNumber} does not need updating`); return { prResult: PrResult.NotUpdated, pr: existingPr };