From 8198564327e2f487bdc3c8c0061ad52df5c02a60 Mon Sep 17 00:00:00 2001 From: Kiryl Mialeshka <8974488+meskill@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:45:44 +0100 Subject: [PATCH] fix: jobs dependency id generator (#94) --- crates/gh-workflow/src/generate.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/gh-workflow/src/generate.rs b/crates/gh-workflow/src/generate.rs index 1154a8b..cd8d4e5 100644 --- a/crates/gh-workflow/src/generate.rs +++ b/crates/gh-workflow/src/generate.rs @@ -107,13 +107,14 @@ fn organize_job_dependency(mut workflow: Workflow) -> Workflow { } else { // Create a job-id for the job let id = format!("job-{}", job_id); - job_id += 1; // Add job id as the dependency job_ids.push(id.clone()); // Insert the missing job into the new_jobs new_jobs.insert(format!("job-{}", job_id), dep_job.clone()); + + job_id += 1; } } job.needs = Some(job_ids);