pub struct ApiData {
pub runs: Vec<WorkflowRun>,
pub jobs: Vec<Job>,
pub public: bool,
}Expand description
Runs and jobs loaded from one directory.
jobs keeps finished jobs and in-progress jobs. Job::counts selects
the finished ones.
Fields§
§runs: Vec<WorkflowRun>§jobs: Vec<Job>§public: booltrue when repo.json says private is false.
Standard runner SKUs then invoice at zero and keep their list price.
Larger runners stay charged. A missing file is false.
Implementations§
Source§impl ApiData
impl ApiData
Sourcepub fn counted_jobs(&self) -> impl Iterator<Item = &Job>
pub fn counted_jobs(&self) -> impl Iterator<Item = &Job>
Finished jobs, in storage order.
Sourcepub fn in_progress_jobs(&self) -> impl Iterator<Item = &Job>
pub fn in_progress_jobs(&self) -> impl Iterator<Item = &Job>
Jobs with no completed_at, in storage order.
Sourcepub fn workflow_path(&self, run_id: u64) -> String
pub fn workflow_path(&self, run_id: u64) -> String
Linked workflow path for run_id, or UNKNOWN_WORKFLOW.
Sourcepub fn is_inherited_copy(&self, job: &Job) -> bool
pub fn is_inherited_copy(&self, job: &Job) -> bool
A job on the latest attempt whose started_at is before run_started_at.
GitHub can carry a finished job onto the new attempt. That copy adds no cost. A job from an earlier attempt stays billable. A missing run, a different attempt, or a missing or unreadable timestamp is not a copy.
Sourcepub fn inherited_copy_net(&self, job: &Job) -> Option<Micros>
pub fn inherited_copy_net(&self, job: &Job) -> Option<Micros>
Some(0) when job is an inherited copy.
Sourcepub fn billable_jobs(&self) -> impl Iterator<Item = &Job>
pub fn billable_jobs(&self) -> impl Iterator<Item = &Job>
Finished jobs that add cost. Inherited copies are omitted.