Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Nov 28, 2024
1 parent 527bbaf commit 87bd194
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<String, Job>::new();
Expand Down

0 comments on commit 87bd194

Please sign in to comment.