From d830aca920554c0161fd92a59cc3e085391710cb Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 17 Aug 2023 14:03:25 -0400 Subject: [PATCH] Simplify to just name instead of artifactName --- .github/workflows/artifact-tests.yml | 6 +++--- packages/artifact/src/internal/find/list-artifacts.ts | 4 ++-- packages/artifact/src/internal/shared/interfaces.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index 90a97129..dc7fe62b 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -122,13 +122,13 @@ jobs: } const artifactNames = artifacts.map(artifact => artifact.name) - if (!artifactName.contains('my-artifact-ubuntu-latest')){ + if (!artifactNames.contains('my-artifact-ubuntu-latest')){ throw new Error('Expected artifact list to contain an artifact named my-artifact-ubuntu-latest but it did not find one') } - if (!artifactName.contains('my-artifact-windows-latest')){ + if (!artifactNames.contains('my-artifact-windows-latest')){ throw new Error('Expected artifact list to contain an artifact named my-artifact-windows-latest but it did not find one') } - if (!artifactName.contains('my-artifact-macos-latest')){ + if (!artifactNames.contains('my-artifact-macos-latest')){ throw new Error('Expected artifact list to contain an artifact named my-artifact-macos-latest but it did not find one') } diff --git a/packages/artifact/src/internal/find/list-artifacts.ts b/packages/artifact/src/internal/find/list-artifacts.ts index f7722f92..3d39c7b9 100644 --- a/packages/artifact/src/internal/find/list-artifacts.ts +++ b/packages/artifact/src/internal/find/list-artifacts.ts @@ -72,7 +72,7 @@ export async function listArtifacts( // Iterate over the first page listArtifactResponse.artifacts.forEach(artifact => { artifacts.push({ - artifactName: artifact.name, + name: artifact.name, artifactId: artifact.id, url: artifact.url, size: artifact.size_in_bytes @@ -99,7 +99,7 @@ export async function listArtifacts( listArtifactResponse.artifacts.forEach(artifact => { artifacts.push({ - artifactName: artifact.name, + name: artifact.name, artifactId: artifact.id, url: artifact.url, size: artifact.size_in_bytes diff --git a/packages/artifact/src/internal/shared/interfaces.ts b/packages/artifact/src/internal/shared/interfaces.ts index 1bada558..7991bbf6 100644 --- a/packages/artifact/src/internal/shared/interfaces.ts +++ b/packages/artifact/src/internal/shared/interfaces.ts @@ -109,7 +109,7 @@ export interface Artifact { /** * The name of the artifact */ - artifactName: string + name: string /** * The ID of the artifact