From 7b565e7997202ba891131bcaeebca78061c910b4 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 6 Jan 2025 17:28:16 +0000 Subject: [PATCH] Fix building the automations mermaid diagram (#28881) * Fix building the automations mermaid diagram The was using a runner output instead which is not going to work in this simple script, so just skip anything that's not an array - not really sure what else we can do here short of implementing large parts of github actions. * Prettier --- scripts/gen-workflow-mermaid.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/gen-workflow-mermaid.ts b/scripts/gen-workflow-mermaid.ts index 1376323e84d..c33398268f4 100755 --- a/scripts/gen-workflow-mermaid.ts +++ b/scripts/gen-workflow-mermaid.ts @@ -573,7 +573,10 @@ components.forEach((graph) => { let variations = cartesianProduct( Object.keys(job.strategy.matrix) - .filter((key) => key !== "include" && key !== "exclude") + .filter( + (key) => + key !== "include" && key !== "exclude" && Array.isArray(job.strategy!.matrix[key]), + ) .map((matrixKey) => { return job.strategy!.matrix[matrixKey].map((value) => ({ [matrixKey]: value })); }),