From 82bdf5012e4942709deb914ef7aee6e463c57ec3 Mon Sep 17 00:00:00 2001 From: Juan Palacios Date: Mon, 13 Nov 2023 17:06:06 +1100 Subject: [PATCH] Always replace the body of the comment --- .github/utils/github.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/utils/github.js b/.github/utils/github.js index b3b61670..93e91d0e 100644 --- a/.github/utils/github.js +++ b/.github/utils/github.js @@ -40,14 +40,7 @@ const updateComment = (id, report) => { exports.updateComment = async (target, report) => { const comment = await getExistingReportComment(); if (comment) { - const targetRegex = new RegExp(`(\\
${target}:)([\\s\\S]+?)(table\\>\\n<\\/details\\>)`); - let newComment; - if (targetRegex.test(comment.body)) { - newComment = comment.body.replace(targetRegex, report); - } else { - newComment = comment.body + report; - } - await updateComment(comment.id, newComment); + await updateComment(comment.id, REPORT_TITLE + report); } else { await createComment(REPORT_TITLE + report); }