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.")) {