From c55d501b564ee5ce369629a6e60206cccc26720e Mon Sep 17 00:00:00 2001 From: PurseChicken Date: Fri, 17 Nov 2023 12:47:55 -0800 Subject: [PATCH] Use REF_NAME instead of BRANCH_NAME Signed-off-by: PurseChicken --- plugins/cloudbuild/api-report.md | 2 +- plugins/cloudbuild/src/api/types.ts | 2 +- .../src/components/WorkflowRunDetails/WorkflowRunDetails.tsx | 4 ++-- .../components/WorkflowRunsTable/WorkflowRunsTable.test.tsx | 2 +- .../src/components/WorkflowRunsTable/WorkflowRunsTable.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/cloudbuild/api-report.md b/plugins/cloudbuild/api-report.md index f8fbd9ee92..0e152baa0f 100644 --- a/plugins/cloudbuild/api-report.md +++ b/plugins/cloudbuild/api-report.md @@ -237,7 +237,7 @@ export interface StorageSource { // @public (undocumented) export interface Substitutions { // (undocumented) - BRANCH_NAME: string; + REF_NAME: string; // (undocumented) COMMIT_SHA: string; // (undocumented) diff --git a/plugins/cloudbuild/src/api/types.ts b/plugins/cloudbuild/src/api/types.ts index 1dd03265bc..b721e8dca1 100644 --- a/plugins/cloudbuild/src/api/types.ts +++ b/plugins/cloudbuild/src/api/types.ts @@ -81,7 +81,7 @@ export interface Options { export interface Substitutions { COMMIT_SHA: string; SHORT_SHA: string; - BRANCH_NAME: string; + REF_NAME: string; REPO_NAME: string; REVISION_ID: string; } diff --git a/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx b/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx index a35d9b6f6c..ee282848bc 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx @@ -97,9 +97,9 @@ export const WorkflowRunDetails = (props: { entity: Entity }) => { - Branch + Ref - {details.value?.substitutions.BRANCH_NAME} + {details.value?.substitutions.REF_NAME} diff --git a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.test.tsx b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.test.tsx index 0152f9d964..92a806bee7 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.test.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.test.tsx @@ -35,7 +35,7 @@ describe('', () => { substitutions: { COMMIT_SHA: 'e3adasd2e3adasd2e3adasd2', SHORT_SHA: 'f12j1231', - BRANCH_NAME: 'main', + REF_NAME: 'main', REPO_NAME: 'backstage', REVISION_ID: 'g123123', }, diff --git a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index 210a67d0dc..dbefffc617 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -72,7 +72,7 @@ const generatedColumns: TableColumn[] = [ title: 'Ref', render: (row: Partial) => ( - {row.substitutions?.BRANCH_NAME} + {row.substitutions?.REF_NAME} ), },