We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 846f686 commit f9c66f1Copy full SHA for f9c66f1
frontend/src/routes/actions-dashboard.tsx
@@ -45,9 +45,17 @@ const loadRepositories = async () => {
45
const workflowRunsbyWorkflow = workflowRuns.results.filter(
46
(run) => run.workflow === workflow.node_id
47
);
48
+ const mostRecentRun = workflowRunsbyWorkflow.reduce(
49
+ (latest, current) => {
50
+ return new Date(current.updated_at) > new Date(latest.updated_at)
51
+ ? current
52
+ : latest;
53
+ },
54
+ workflowRunsbyWorkflow[0] || null
55
+ );
56
return {
57
...workflow,
- runs: workflowRunsbyWorkflow,
58
+ runs: [mostRecentRun],
59
};
60
}
61
0 commit comments