From a7e5ad3287f8d18c373ff36192f66a1317cdf676 Mon Sep 17 00:00:00 2001 From: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:22:58 +0100 Subject: [PATCH] fix(ci): allow spaces around x in PR template checkboxes (#66476) --- .github/scripts/pr-guidelines/check-pr-template.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;