mirror of
https://github.com/dessant/lock-threads.git
synced 2026-03-13 01:27:03 -04:00
fix: update GitHub API calls
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user