From 375b2d809d92206b4ac5998fec0bab7a0c41b013 Mon Sep 17 00:00:00 2001 From: tom wei Date: Wed, 4 May 2022 10:05:26 -0700 Subject: [PATCH] Implemented bug fix for shouldDeleteComments logic --- dist/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/main.js b/dist/main.js index 3f77464a..d6266d76 100644 --- a/dist/main.js +++ b/dist/main.js @@ -23137,11 +23137,11 @@ async function main$1() { const baselcov = baseRaw && (await parse$2(baseRaw)); const body = diff(lcov, baselcov, options).substring(0, MAX_COMMENT_CHARS); - if (shouldDeleteOldComments) { - await deleteOldComments(githubClient, options, github_1); - } - if (github_1.eventName === "pull_request") { + if (shouldDeleteOldComments) { + await deleteOldComments(githubClient, options, github_1); + } + await githubClient.issues.createComment({ repo: github_1.repo.repo, owner: github_1.repo.owner, @@ -23158,7 +23158,7 @@ async function main$1() { } } -main$1().catch(function(err) { +main$1().catch(function (err) { console.log(err); core$1.setFailed(err.message); });