From 8ed36b98ce9605b0a6bbd34434167ef44eaaf6cc Mon Sep 17 00:00:00 2001 From: Drew Smirnoff Date: Tue, 21 Apr 2026 16:11:30 +0400 Subject: [PATCH] ci: use regex to stop errors (#747) --- .github/workflows/bot-pr-checks.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bot-pr-checks.yml b/.github/workflows/bot-pr-checks.yml index ad46e3fd5473a83bf56f0c27e391690f7efa2ddb..a55701e6bae1104e822142337d1981afec0488bc 100644 --- a/.github/workflows/bot-pr-checks.yml +++ b/.github/workflows/bot-pr-checks.yml @@ -36,7 +36,9 @@ jobs: } // Check if they just left the HTML comments from the template empty - const cleanedBody = body.replace(//g, "").trim(); + const commentRegex = new RegExp("", "g"); + const cleanedBody = body.replace(commentRegex, "").trim(); + if (cleanedBody.length < 10) { errors.push("- **Body**: The PR description is too short or hasn't replaced the template placeholders."); }