From a59f976dd459cec5928d6a80f7cd414e999a5aa3 Mon Sep 17 00:00:00 2001 From: Rob Herley Date: Fri, 1 Dec 2023 09:05:46 -0500 Subject: [PATCH] minor fixes --- packages/artifact/src/internal/client.ts | 4 ++-- packages/artifact/src/internal/download/download-artifact.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/artifact/src/internal/client.ts b/packages/artifact/src/internal/client.ts index 3d5b999b..20563abc 100644 --- a/packages/artifact/src/internal/client.ts +++ b/packages/artifact/src/internal/client.ts @@ -125,7 +125,7 @@ If the error persists, please check whether Actions is operating normally at [ht */ async downloadArtifact( artifactId: number, - options?: Partial + options?: DownloadArtifactOptions & FindOptions ): Promise { if (isGhes()) { warning( @@ -152,7 +152,7 @@ If the error persists, please check whether Actions is operating normally at [ht ) } - return downloadArtifactInternal(artifactId) + return downloadArtifactInternal(artifactId, options) } catch (error) { warning( `Artifact download failed with error: ${error}. diff --git a/packages/artifact/src/internal/download/download-artifact.ts b/packages/artifact/src/internal/download/download-artifact.ts index 24fe3e24..cf5b5e15 100644 --- a/packages/artifact/src/internal/download/download-artifact.ts +++ b/packages/artifact/src/internal/download/download-artifact.ts @@ -12,6 +12,7 @@ import {getGitHubWorkspaceDir} from '../shared/config' import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client' import { GetSignedArtifactURLRequest, + Int64Value, ListArtifactsRequest } from '../../generated' import {getBackendIdsFromToken} from '../shared/util' @@ -110,7 +111,8 @@ export async function downloadArtifactInternal( const listReq: ListArtifactsRequest = { workflowRunBackendId, - workflowJobRunBackendId + workflowJobRunBackendId, + idFilter: Int64Value.create({value: artifactId.toString()}) } const {artifacts} = await artifactClient.ListArtifacts(listReq)