Skip to content

Commit

Permalink
new build
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyscholl committed Oct 17, 2023
1 parent 198bc3c commit e20f55f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function countPositiveReactions(data) {
}
exports.countPositiveReactions = countPositiveReactions;
function markDiscussionCommentAnswer() {
var _a, _b;
return __awaiter(this, void 0, void 0, function* () {
const token = yield (0, core_1.getInput)("GH_TOKEN");
const reactionThreshold = yield Number((0, core_1.getInput)("reaction_threshold"));
Expand Down Expand Up @@ -128,15 +127,15 @@ function markDiscussionCommentAnswer() {
},
});
const result = yield countPositiveReactions(checkComments);
if (result && Number(result.totalReactions) <= Number(reactionThreshold)) {
if (result && Number(result.totalPositiveReactions) <= Number(reactionThreshold)) {
yield (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)("totalPositiveReactions", result.totalPositiveReactions);
yield (0, core_1.setOutput)("commentId", result.commentId);
}
catch (err) {
Expand All @@ -158,8 +157,8 @@ function markDiscussionCommentAnswer() {
authorization: `token ${token}`,
},
});
yield (0, core_1.setOutput)("discussionId", (_a = response === null || response === void 0 ? void 0 : response.markDiscussionCommentAsAnswer) === null || _a === void 0 ? void 0 : _a.discussion);
yield (0, core_1.setOutput)("clientMutationId", (_b = response === null || response === void 0 ? void 0 : response.markDiscussionCommentAsAnswer) === null || _b === void 0 ? void 0 : _b.clientMutationId);
yield (0, core_1.setOutput)("discussionId", response.markDiscussionCommentAsAnswer.discussion);
yield (0, core_1.setOutput)("clientMutationId", response.markDiscussionCommentAsAnswer.clientMutationId);
}
catch (error) {
yield (0, core_1.setFailed)(error.message);
Expand Down

0 comments on commit e20f55f

Please sign in to comment.