Use automatic pagination mapping function

This commit is contained in:
Henry Mercer 2024-05-21 21:34:55 +01:00
parent 1bea17f717
commit 898dead2d6
3 changed files with 13 additions and 7 deletions

View file

@ -214,11 +214,12 @@ export async function listActionsCaches(
logger.debug(`Retrieving Actions caches for key ${key} and ref ${ref}`);
const apiClient = getApiClient();
return await apiClient.paginate(
"GET /repos/{owner}/{repo}/actions/caches",
{ owner: repositoryNwo.owner, repo: repositoryNwo.repo, key, ref },
(response) => response.data.actions_caches,
);
return await apiClient.paginate("GET /repos/{owner}/{repo}/actions/caches", {
owner: repositoryNwo.owner,
repo: repositoryNwo.repo,
key,
ref,
});
}
export function wrapApiConfigurationError(e: unknown) {