From 7c4d3fbe75499ebe0df78a48f7f81dd632ae12a6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 26 Oct 2023 08:46:39 +0100 Subject: [PATCH] Improve naming for matrix job subgraph Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- scripts/gen-workflow-mermaid.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gen-workflow-mermaid.ts b/scripts/gen-workflow-mermaid.ts index c120f4baf47..de8f4e0c8cf 100755 --- a/scripts/gen-workflow-mermaid.ts +++ b/scripts/gen-workflow-mermaid.ts @@ -568,7 +568,8 @@ components.forEach((graph) => { return; } - printer.subgraph(job.id, job.name, () => { + const jobName = job.name.replace(/\${{.+}}/g, "").replace(/(?:\(\)| )+/g, " "); + printer.subgraph(job.id, jobName, () => { variations.forEach((variation, i) => { let variationName = job.name; if (variationName.includes("${{ matrix.")) {