Skip to content

Commit b114e9c

Browse files
fix: octokit usage
1 parent 57b01d7 commit b114e9c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/api-helper.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import fs from 'fs';
22
import path from 'path';
33
import {Context} from '@actions/github/lib/context';
4-
import {PaginateInterface} from '@octokit/plugin-paginate-rest';
54
import {OctokitResponse} from '@octokit/types';
65
import {components} from '@octokit/openapi-types';
76
import {exportVariable} from '@actions/core';
@@ -289,7 +288,7 @@ export default class ApiHelper {
289288
* @param {PullsListParams} params params
290289
* @return {AsyncIterable<Array<PullsListResponseData>>} pull request list
291290
*/
292-
public pullsList = (params: PullsListParams): Promise<Array<PullsListResponseData>> => (this.octokit.paginate as PaginateInterface)(
291+
public pullsList = (params: PullsListParams): Promise<Array<PullsListResponseData>> => this.octokit.paginate(
293292
this.octokit.rest.pulls.list,
294293
Object.assign({
295294
sort: 'created',
@@ -553,7 +552,7 @@ export default class ApiHelper {
553552
/**
554553
* @return {Promise<Array<string>>} tags
555554
*/
556-
public getTags = async(): Promise<Array<string>> => (await (this.octokit.paginate as PaginateInterface)(
555+
public getTags = async(): Promise<Array<string>> => (await this.octokit.paginate(
557556
this.octokit.rest.git.listMatchingRefs,
558557
{
559558
...this.context.repo,

0 commit comments

Comments
 (0)