diff --git a/static_report/src/components/Reports/ReportContextBar.tsx b/static_report/src/components/Reports/ReportContextBar.tsx index a3141ab29..b7e2f432d 100644 --- a/static_report/src/components/Reports/ReportContextBar.tsx +++ b/static_report/src/components/Reports/ReportContextBar.tsx @@ -30,7 +30,7 @@ export function ReportContextBar({ }: Props) { let datasource: string | undefined = undefined; let version: string | undefined = undefined; - let gitBranch: string | undefined = undefined; + let gitBranch: string | null | undefined = undefined; let githubPr: string | undefined = undefined; let githubPrUrl: string | undefined = undefined; let baseFrom: string | undefined = undefined; @@ -58,6 +58,8 @@ export function ReportContextBar({ report.input?.datasource.git_branch ) { gitBranch = `${report.base?.datasource.git_branch} ↔ ${report.input?.datasource.git_branch}`; + } else if (report.input?.datasource.git_branch) { + gitBranch = report.input?.datasource.git_branch; } if (report.metadata?.github_pr_id && report.metadata?.github_pr_url) { diff --git a/static_report/src/sdlc/single-report-schema.ts b/static_report/src/sdlc/single-report-schema.ts index 71115d148..abfa0201f 100644 --- a/static_report/src/sdlc/single-report-schema.ts +++ b/static_report/src/sdlc/single-report-schema.ts @@ -350,7 +350,7 @@ export interface AssertionTest { export interface DataSource { name: string; type: string; - git_branch?: string; + git_branch?: string | null; git_sha?: string; skip_datasource?: boolean; }