diff --git a/.github/scripts/pr-guidelines/check-pr-template.js b/.github/scripts/pr-guidelines/check-pr-template.js index 6744603feb9..d74bc0d7682 100644 --- a/.github/scripts/pr-guidelines/check-pr-template.js +++ b/.github/scripts/pr-guidelines/check-pr-template.js @@ -36,8 +36,9 @@ module.exports = async ({ github, context, isAllowListed }) => { 'I have read and followed the [how to open a pull request guide]', 'My pull request targets the' ]; - const allRequiredTicked = requiredTicked.every( - item => body.includes(`[x] ${item}`) || body.includes(`[X] ${item}`) + const normalizedBody = body.replace(/\[\s*[xX]\s*\]/g, '[x]'); + const allRequiredTicked = requiredTicked.every(item => + normalizedBody.includes(`[x] ${item}`) ); if (templatePresent && allRequiredTicked) return;