Skip to content

Commit 898dead

Browse files
committed
Use automatic pagination mapping function
1 parent 1bea17f commit 898dead

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

lib/api-client.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api-client.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,12 @@ export async function listActionsCaches(
214214
logger.debug(`Retrieving Actions caches for key ${key} and ref ${ref}`);
215215

216216
const apiClient = getApiClient();
217-
return await apiClient.paginate(
218-
"GET /repos/{owner}/{repo}/actions/caches",
219-
{ owner: repositoryNwo.owner, repo: repositoryNwo.repo, key, ref },
220-
(response) => response.data.actions_caches,
221-
);
217+
return await apiClient.paginate("GET /repos/{owner}/{repo}/actions/caches", {
218+
owner: repositoryNwo.owner,
219+
repo: repositoryNwo.repo,
220+
key,
221+
ref,
222+
});
222223
}
223224

224225
export function wrapApiConfigurationError(e: unknown) {

0 commit comments

Comments
 (0)