Skip to content

Commit

Permalink
Update octokit rest methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Evans committed May 27, 2021
1 parent 152106b commit 6cfa7f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 6cfa7f6

Please sign in to comment.