Skip to content

[Feature][GitHub] collect GitHub Actions job created_at using REST GET /repos/{owner}/{repo}/actions/jobs/{job_id} and persist for queued_duration_sec #8823

@sobanjom

Description

@sobanjom

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Use case

As a DevOps engineer I want to fetch the authoritative GitHub Actions job queued timestamp using the REST endpoint GET /repos/{owner}/{repo}/actions/jobs/{job_id}, persist it into the jobs table, and compute queued_duration_sec so platform dashboards and alerts can show job queue time and detect CI queue bottlenecks.

Description

Summary

Add an optional REST-based job collector that calls GET /repos/{owner}/{repo}/actions/jobs/{job_id} for each job discovered and persists jobs[].created_at so job queue time (queued = started_at - created_at) can be computed and aggregated into cicd_pipelines.queued_duration_sec.

Background / problem

  • The existing GraphQL-based CollectJobs data (CheckRun) provides startedAt and completedAt but does not reliably expose a job created_at (queued) timestamp.
  • Without created_at we cannot compute job queue durations

Proposal

  • Implement a new, opt-in REST collector subtask that:
    • Uses the job's stable ID (GraphQL DatabaseId / numeric job id) and calls GET /repos/{owner}/{repo}/actions/jobs/{job_id} to retrieve created_at.
    • Persists the timestamp to a new column (e.g., job_created_at) on _tool_github_jobs (or to a raw table and then transform/upsert).
    • Updates transform/aggregator logic to compute job_queued_sec per job and then aggregate (e.g., average) into cicd_pipelines.queued_duration_sec.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/pluginsThis issue or PR relates to pluginspriority/highThis issue is very importanttype/feature-requestThis issue is a proposal for something new

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions