From b330375f642df11f0c4eea7e743bec2c85270825 Mon Sep 17 00:00:00 2001 From: Wesley Scholl Date: Sun, 15 Oct 2023 17:42:52 -0400 Subject: [PATCH] New build --- dist/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7b44067..de972d7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -115,16 +115,16 @@ function markDiscussionCommentAnswer() { }, }); const result = yield countPositiveReactions(checkComments); + if (result && Number(result.totalReactions) >= Number(reactionThreshold)) { + (0, core_1.setFailed)("Comment reaction threshold has not been met to be considered an answer."); + return; + } commentNodeId = result.commentId; yield (0, core_1.setOutput)("commentText", result.commentText); yield (0, core_1.setOutput)("reactionThreshold", reactionThreshold); yield (0, core_1.setOutput)("totalReactions", result.totalReactions); console.log(result.totalReactions); yield (0, core_1.setOutput)("commentId", result.commentId); - if (Number(result.totalReactions) >= Number(reactionThreshold)) { - (0, core_1.setFailed)("Comment reaction threshold has not been met to be considered an answer."); - return; - } } catch (err) { console.log(err);