From 5997e25ad9b4bb8bf9d221889e85b99b2d930f3d Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 5 May 2026 18:43:01 +0100 Subject: [PATCH] Update `listActionsCaches` doc --- lib/analyze-action.js | 4 ++-- lib/init-action-post.js | 4 ++-- src/api-client.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 4ed11db5b..78c055364 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -107213,14 +107213,14 @@ function computeAutomationID(analysis_key, environment) { } return automationID; } -async function listActionsCaches(key, ref) { +async function listActionsCaches(keyPrefix, ref) { const repositoryNwo = getRepositoryNwo(); return await getApiClient().paginate( "GET /repos/{owner}/{repo}/actions/caches", { owner: repositoryNwo.owner, repo: repositoryNwo.repo, - key, + key: keyPrefix, ref } ); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 5e5ed0f60..3bb614ebb 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -165101,14 +165101,14 @@ function computeAutomationID(analysis_key, environment) { } return automationID; } -async function listActionsCaches(key, ref) { +async function listActionsCaches(keyPrefix, ref) { const repositoryNwo = getRepositoryNwo(); return await getApiClient().paginate( "GET /repos/{owner}/{repo}/actions/caches", { owner: repositoryNwo.owner, repo: repositoryNwo.repo, - key, + key: keyPrefix, ref } ); diff --git a/src/api-client.ts b/src/api-client.ts index 4b8cb7b34..0f907eb9b 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -252,9 +252,9 @@ export interface ActionsCacheItem { size_in_bytes?: number; } -/** List all Actions cache entries matching the provided key and ref. */ +/** List all Actions cache entries starting with the provided key prefix and matching the provided ref. */ export async function listActionsCaches( - key: string, + keyPrefix: string, ref?: string, ): Promise { const repositoryNwo = getRepositoryNwo(); @@ -264,7 +264,7 @@ export async function listActionsCaches( { owner: repositoryNwo.owner, repo: repositoryNwo.repo, - key, + key: keyPrefix, ref, }, );