From 6cfa7f64aeae96f3a08cd28e6361be19b63f18b4 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Thu, 27 May 2021 13:25:22 +0900 Subject: [PATCH] Update octokit rest methods --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 2d3adf1..ce6c3a8 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ async function addReactions(octokit, repo, comment_id, reactions) { let results = await Promise.allSettled( ReactionsSet.map(async (item) => { - await octokit.reactions.createForIssueComment({ + await octokit.rest.reactions.createForIssueComment({ owner: repo[0], repo: repo[1], comment_id: comment_id, @@ -104,7 +104,7 @@ async function run() { var commentBody = ""; if (editMode == "append") { // Get the comment body - const { data: comment } = await octokit.issues.getComment({ + const { data: comment } = await octokit.rest.issues.getComment({ owner: repo[0], repo: repo[1], comment_id: inputs.commentId, @@ -114,7 +114,7 @@ async function run() { commentBody = commentBody + inputs.body; core.debug(`Comment body: ${commentBody}`); - await octokit.issues.updateComment({ + await octokit.rest.issues.updateComment({ owner: repo[0], repo: repo[1], comment_id: inputs.commentId, @@ -134,7 +134,7 @@ async function run() { core.setFailed("Missing comment 'body'."); return; } - const { data: comment } = await octokit.issues.createComment({ + const { data: comment } = await octokit.rest.issues.createComment({ owner: repo[0], repo: repo[1], issue_number: inputs.issueNumber,