From 2c898cf3fd5818ab286ad2a7e1653a2e309a6f96 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 21 Oct 2024 02:01:35 +0800 Subject: [PATCH] chore: block PR with empty description --- scripts/workflow/test-route/identify.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/workflow/test-route/identify.mjs b/scripts/workflow/test-route/identify.mjs index 4aa342d8c4..98b68a9fe1 100644 --- a/scripts/workflow/test-route/identify.mjs +++ b/scripts/workflow/test-route/identify.mjs @@ -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(//g, ''); - const m = bodyNoCmts.match(/```routes\s+([\S\s]*?)```/); + const bodyNoCmts = body?.replaceAll(//g, ''); + const m = bodyNoCmts?.match(/```routes\s+([\S\s]*?)```/); core.debug(`match: ${m}`); let routes = null;