mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-26 08:01:08 -04:00
fix(ci): allow spaces around x in PR template checkboxes (#66476)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user