From a3ccc71fffa8f16e865eb3661cf8852e11d0a289 Mon Sep 17 00:00:00 2001 From: dessant Date: Fri, 9 Jul 2021 21:50:18 +0300 Subject: [PATCH] fix: update GitHub API calls --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index e8be1e3..f1a8674 100644 --- a/src/index.js +++ b/src/index.js @@ -46,7 +46,7 @@ class App { if (lockComment) { core.debug(`Commenting (${type}: ${issue.issue_number})`); - await this.client.issues.createComment({ + await this.client.rest.issues.createComment({ ...issue, body: lockComment }); @@ -54,7 +54,7 @@ class App { if (lockLabels) { core.debug(`Labeling (${type}: ${issue.issue_number})`); - await this.client.issues.addLabels({ + await this.client.rest.issues.addLabels({ ...issue, labels: lockLabels }); @@ -73,7 +73,7 @@ class App { } else { params = issue; } - await this.client.issues.lock(params); + await this.client.rest.issues.lock(params); threads.push(issue); } @@ -109,7 +109,7 @@ class App { core.debug(`Searching (${type}s)`); const results = ( - await this.client.search.issuesAndPullRequests({ + await this.client.rest.search.issuesAndPullRequests({ q: query, sort: 'updated', order: 'desc',