diff --git a/src/generate.rs b/src/generate.rs index 4c775fe..b604a47 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -81,6 +81,14 @@ impl Generate { } } +/// Organizes job dependencies within a given `Workflow`. +/// +/// This function iterates over all jobs in the provided `Workflow` and ensures that +/// each job's dependencies are correctly set up. If a job has dependencies specified +/// in `tmp_needs`, it checks if those dependencies are already defined in the workflow. +/// If not, it creates new job IDs for the missing dependencies and inserts them into +/// the workflow. The function then updates the `needs` field of each job with the +/// appropriate job IDs. fn organize_job_dependency(mut workflow: Workflow) -> Workflow { let mut job_id = 0; let mut new_jobs = IndexMap::::new();