Skip to content

Commit 3350b9b

Browse files
authored
Merge e4de062 into 48cf6f9
2 parents 48cf6f9 + e4de062 commit 3350b9b

File tree

3 files changed

+440
-355
lines changed

3 files changed

+440
-355
lines changed

dist/post.js

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/workflow_gantt.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export const formatStep = (step: ganttStep): string => {
6868
};
6969

7070
const formatName = (name: string, sec: number): string => {
71-
return `${name} (${formatShortElapsedTime(sec)})`;
71+
return `${escapeName(name)} (${formatShortElapsedTime(sec)})`;
72+
};
73+
74+
const escapeName = (name: string): string => {
75+
return name.replaceAll(":", "");
7276
};
7377

7478
const convertStepToStatus = (
@@ -98,7 +102,7 @@ export const createGantt = (
98102
): string => {
99103
const title = workflowJobs[0].workflow_name;
100104
const jobs = workflowJobs.map((job, jobIndex, _jobs): ganttJob => {
101-
const section = job.name;
105+
const section = escapeName(job.name);
102106
const status: ganttStep["status"] = "active";
103107
const startJobElapsedSec = diffSec(workflow.created_at, job.created_at);
104108
const waitingRunnerElapsedSec = diffSec(job.created_at, job.started_at);

0 commit comments

Comments
 (0)