From 692316d2311823fec9b394590f7faaa0b4a2066b Mon Sep 17 00:00:00 2001 From: Karthikeyan Perumal <7823084+karthikeyanjp@users.noreply.github.com> Date: Fri, 8 Mar 2024 20:28:13 -0600 Subject: [PATCH] Fixed bug in WorkflowRunStatus component where skipped & cancelled status were shown as completed Signed-off-by: Karthikeyan Perumal <7823084+karthikeyanjp@users.noreply.github.com> --- .changeset/thick-stingrays-sit.md | 5 +++++ .../src/components/WorkflowRunStatus/WorkflowRunStatus.tsx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/thick-stingrays-sit.md diff --git a/.changeset/thick-stingrays-sit.md b/.changeset/thick-stingrays-sit.md new file mode 100644 index 0000000000..8a932c331a --- /dev/null +++ b/.changeset/thick-stingrays-sit.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-github-actions': patch +--- + +Fixed bug in WorkflowRunStatus component where status description of skipped and cancelled workflow runs appeared as success diff --git a/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx b/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx index 48d736aa76..84efda4fce 100644 --- a/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx +++ b/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx @@ -83,7 +83,8 @@ export function getStatusDescription({ return 'In progress'; case 'completed': switch (conclusion?.toLocaleLowerCase('en-US')) { - case 'skipped' || 'canceled': + case 'skipped': + case 'cancelled': return 'Aborted'; case 'timed_out': return 'Timed out';