Skip to content

Commit d899147

Browse files
chore: update pagination usage
1 parent 46fe47c commit d899147

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/api-helper.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,13 @@ export default class ApiHelper {
281281
* @return {AsyncIterable<PullsListResponseData>} pull request list
282282
*/
283283
public pullsList = (params: PullsListParams): Promise<PullsListResponseData> => (this.octokit.paginate as PaginateInterface)(
284-
(this.octokit as RestEndpointMethods).pulls.list.endpoint.merge(Object.assign({
284+
(this.octokit as RestEndpointMethods).pulls.list,
285+
Object.assign({
285286
sort: 'created',
286287
direction: 'asc',
287288
}, params, {
288289
...this.context.repo,
289-
})),
290+
}),
290291
);
291292

292293
/**
@@ -546,10 +547,11 @@ export default class ApiHelper {
546547
* @return {Promise<Array<string>>} tags
547548
*/
548549
public getTags = async(): Promise<Array<string>> => (await (this.octokit.paginate as PaginateInterface)(
549-
(this.octokit as RestEndpointMethods).git.listMatchingRefs.endpoint.merge({
550+
(this.octokit as RestEndpointMethods).git.listMatchingRefs,
551+
{
550552
...this.context.repo,
551553
ref: 'tags/',
552-
}),
554+
},
553555
)).map((item): string => trimRef((item as GitListMatchingRefsResponseData[number]).ref));
554556

555557
/**

0 commit comments

Comments
 (0)