diff --git a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx index fbef8458b4..3eba4981e7 100644 --- a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx @@ -107,7 +107,7 @@ export const RecentWorkflowRunsCard = ({ component={RouterLink} to={generatePath('./ci-cd/:id', { id: data.id! })} > - {firstLine(data.message || '')} + {firstLine(data.message ?? '')} ), }, diff --git a/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts b/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts index cc0bf54de3..d35283e78d 100644 --- a/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts +++ b/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts @@ -45,20 +45,20 @@ export const useWorkflowRunJobs = ({ return { total_count: jobs.total_count, jobs: jobs.jobs.map(job => ({ - html_url: job.html_url || undefined, + html_url: job.html_url ?? undefined, status: job.status, - conclusion: job.conclusion || undefined, + conclusion: job.conclusion ?? undefined, started_at: job.started_at, - completed_at: job.completed_at || undefined, + completed_at: job.completed_at ?? undefined, id: job.id, name: job.name, steps: job.steps?.map(step => ({ name: step.name, status: step.status, - conclusion: step.conclusion || undefined, + conclusion: step.conclusion ?? undefined, number: step.number, - started_at: step.started_at || undefined, - completed_at: step.completed_at || undefined, + started_at: step.started_at ?? undefined, + completed_at: step.completed_at ?? undefined, })), })), }; diff --git a/plugins/github-actions/src/components/useWorkflowRuns.ts b/plugins/github-actions/src/components/useWorkflowRuns.ts index a42b80357f..e78e3fbb3f 100644 --- a/plugins/github-actions/src/components/useWorkflowRuns.ts +++ b/plugins/github-actions/src/components/useWorkflowRuns.ts @@ -75,7 +75,7 @@ export function useWorkflowRuns({ setTotal(workflowRunsData.total_count); // Transformation here return workflowRunsData.workflow_runs.map(run => ({ - workflowName: run.name || undefined, + workflowName: run.name ?? undefined, message: run.head_commit?.message, id: `${run.id}`, onReRunClick: async () => { @@ -91,17 +91,17 @@ export function useWorkflowRuns({ } }, source: { - branchName: run.head_branch || undefined, + branchName: run.head_branch ?? undefined, commit: { hash: run.head_commit?.id, url: run.head_repository?.branches_url?.replace( '{/branch}', - run.head_branch || '', + run.head_branch ?? '', ), }, }, - status: run.status || undefined, - conclusion: run.conclusion || undefined, + status: run.status ?? undefined, + conclusion: run.conclusion ?? undefined, url: run.url, githubUrl: run.html_url, }));