diff --git a/plugins/github-actions/src/components/Cards/Cards.tsx b/plugins/github-actions/src/components/Cards/Cards.tsx
index 28783efdea..7e4d5f5fb6 100644
--- a/plugins/github-actions/src/components/Cards/Cards.tsx
+++ b/plugins/github-actions/src/components/Cards/Cards.tsx
@@ -60,7 +60,10 @@ const WidgetContent = ({
metadata={{
status: (
<>
-
+
>
),
message: lastRun.message,
diff --git a/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx b/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx
index fd2cc69376..7714ad6cb6 100644
--- a/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx
+++ b/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx
@@ -106,7 +106,10 @@ const StepView = ({ step }: { step: Step }) => {
/>
-
+
);
@@ -204,7 +207,10 @@ export const WorkflowRunDetails = ({ entity }: { entity: Entity }) => {
Status
-
+
diff --git a/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx b/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx
index 089c319802..b1a71ea3ed 100644
--- a/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx
+++ b/plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx
@@ -14,13 +14,22 @@
* limitations under the License.
*/
-import { StatusPending, StatusRunning, StatusOK } from '@backstage/core';
+import {
+ StatusPending,
+ StatusRunning,
+ StatusOK,
+ StatusWarning,
+ StatusAborted,
+ StatusError,
+} from '@backstage/core';
import React from 'react';
export const WorkflowRunStatus = ({
status,
+ conclusion,
}: {
status: string | undefined;
+ conclusion: string | undefined;
}) => {
if (status === undefined) return null;
switch (status.toLowerCase()) {
@@ -37,11 +46,32 @@ export const WorkflowRunStatus = ({
>
);
case 'completed':
- return (
- <>
- Completed
- >
- );
+ switch (conclusion?.toLowerCase()) {
+ case 'skipped' || 'canceled':
+ return (
+ <>
+ Aborted
+ >
+ );
+ case 'timed_out':
+ return (
+ <>
+ Timed out
+ >
+ );
+ case 'failure':
+ return (
+ <>
+ Error
+ >
+ );
+ default:
+ return (
+ <>
+ Completed
+ >
+ );
+ }
default:
return (
<>
diff --git a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx
index 4e99be6926..fcde5fefbb 100644
--- a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx
+++ b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx
@@ -46,6 +46,7 @@ export type WorkflowRun = {
};
};
status: string;
+ conclusion: string;
onReRunClick: () => void;
};
@@ -84,7 +85,7 @@ const generatedColumns: TableColumn[] = [
render: (row: Partial) => (
-
+
),
},
diff --git a/plugins/github-actions/src/components/useWorkflowRuns.ts b/plugins/github-actions/src/components/useWorkflowRuns.ts
index 25ede3f997..d0be852beb 100644
--- a/plugins/github-actions/src/components/useWorkflowRuns.ts
+++ b/plugins/github-actions/src/components/useWorkflowRuns.ts
@@ -87,6 +87,7 @@ export function useWorkflowRuns({
},
},
status: run.status,
+ conclusion: run.conclusion,
url: run.url,
githubUrl: run.html_url,
}));