chore: block PR with empty description

This commit is contained in:
Tony
2024-10-21 02:01:35 +08:00
parent 9964bbbfb1
commit 2c898cf3fd

View File

@@ -6,8 +6,8 @@ export default async function identify({ github, context, core }, body, number,
core.debug(`sender: ${sender}`);
core.debug(`body: ${body}`);
// Remove all HTML comments before performing the match
const bodyNoCmts = body.replaceAll(/<!--[\S\s]*?-->/g, '');
const m = bodyNoCmts.match(/```routes\s+([\S\s]*?)```/);
const bodyNoCmts = body?.replaceAll(/<!--[\S\s]*?-->/g, '');
const m = bodyNoCmts?.match(/```routes\s+([\S\s]*?)```/);
core.debug(`match: ${m}`);
let routes = null;