fix(ci): allow spaces around x in PR template checkboxes (#66476)

This commit is contained in:
majestic-owl448
2026-03-16 08:22:58 +01:00
committed by GitHub
parent 0fc80621fb
commit a7e5ad3287

View File

@@ -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;