ci: use regex to stop errors (#747)

Drew Smirnoff created

Change summary

.github/workflows/bot-pr-checks.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

.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.");
             }