fix: update GitHub API calls

This commit is contained in:
dessant
2021-07-09 21:50:18 +03:00
parent ee062b15e5
commit a3ccc71fff

View File

@@ -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',