From 3fd2ea423a1a8635a10108e94c7e4e3bd067a84a Mon Sep 17 00:00:00 2001 From: Garvit Mohata Date: Mon, 4 Nov 2024 14:31:01 -0600 Subject: [PATCH] Update pr-filter.js to correct error --- .github/workflows/scripts/pr-filter.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/pr-filter.js b/.github/workflows/scripts/pr-filter.js index 97242016b22..5d0ac697ec4 100644 --- a/.github/workflows/scripts/pr-filter.js +++ b/.github/workflows/scripts/pr-filter.js @@ -12,7 +12,12 @@ function hasDescription(markdown) { module.exports = async ({ github, context, core }) => { const pr = context.payload.pull_request; const body = pr.body === null ? '' : pr.body; - const markdown = body.replace(//g, ''); + let previous; + let markdown = body; + do { + previous = markdown; + markdown = markdown.replace(//g, ''); + } while (markdown !== previous); const action = context.payload.action; const isValid =