workflow-jobs command#
The command reports GitHub workflow jobs with the same authentication flow as
other commands (--token/GITHUB_TOKEN/token cache or --gh):
workflow-jobs xadupre my-own-accelerator --queued
workflow-jobs xadupre my-own-accelerator --queued --dump csv
workflow-jobs xadupre my-own-accelerator --running
workflow-jobs xadupre my-own-accelerator --duration --since 60
workflow-jobs xadupre my-own-accelerator --waiting --since 60
workflow-jobs xadupre my-own-accelerator --duration --since -60d --dump xlsx
workflow-jobs xadupre my-own-accelerator --fail-rate --since 2026-01-01
workflow-jobs xadupre my-own-accelerator --fail-cost --since 7
Synopsis:
usage: python -m moa workflow-jobs [-h] [--token TOKEN] [--api-url API_URL]
[--since SINCE] [--output-dir OUTPUT_DIR]
[--dump {csv,xlsx}] [--gh]
(--queued | --running | --duration | --waiting | --fail-rate | --fail-cost)
[-v]
owner repo
Collect queued jobs, running jobs, successful workflow-run durations,
successful workflow-run waiting times, fail-rate history, or fail-cost
history.
positional arguments:
owner GitHub repository owner
repo GitHub repository name
options:
-h, --help show this help message and exit
--token TOKEN GitHub personal access token
--api-url API_URL GitHub API base URL
--since SINCE Since date, relative offset, or integer day count
(default: 60 days ago).
--output-dir OUTPUT_DIR
Output folder.
--dump {csv,xlsx} Also dump the selected tabular report to CSV or XLSX
in --output-dir.
--gh Fetch the token from `gh auth token`. Cannot be
combined with --token.
--queued List queued jobs sorted by name.
--running List running jobs with their current duration.
--duration Collect historical durations of successful jobs and
generate graphs.
--waiting Collect historical waiting times before successful
jobs start and generate graphs.
--fail-rate Collect historical counts for
failure/cancelled/skipped/success conclusions.
--fail-cost Collect historical failed/cancelled compute time per
day and per job.
-v, --verbose
Options#
Exactly one option must be chosen:
--queuedprints a fixed-width table of queued workflow jobs sorted by job name.--runningprints a fixed-width table of running workflow jobs with their current duration in seconds.--durationwrites historical successful workflow-run durations to CSV and generates SVG/HTML graphs from the run list returned by/actions/runs. The tabular export containsrun_id,created_at,name,pr,duration(in seconds), andurl. With--dump xlsx, it also writes an Excel file. Graph generation excludes duration outliers at least three times the per-workflow median and writes those excluded rows to separateworkflow_jobs_duration_outliers_*files in--output-dirwith aurlcolumn pointing to the workflow run. It also adds hourly average graphs split between weekdays and weekends. The fetch stops at--since(60 days by default).--sinceaccepts an ISO date/datetime, a relative value such as-60d, or an integer day count such as60.--verboseshowsmin(date)/max(date)for each fetched page. Historical run fetches are also cached as JSON files in theworkflow_jobs_cache/subfolder under--output-dirand reused on repeated calls, with one cache file per day. These cache files are written incrementally while pages are being fetched.--waitingwrites historical successful workflow-run queue waiting times to CSV and generates SVG/HTML graphs. The tabular export containsrun_id,created_at,started_at,name,pr, andwaiting_seconds. With--dump xlsx, it also writes an Excel file. Waiting-time graph outliers at least three times the per-workflow median are excluded from the graphs and written to separateworkflow_jobs_waiting_outliers_*files in--output-dirwith aurlcolumn pointing to the workflow run. The fetch/caching behavior is the same as--duration. It also adds hourly average graphs split between weekdays and weekends.--fail-ratewrites historical counts for failed/cancelled/skipped/success jobs to CSV and prints the same data as a fixed-width table. It also writes aworkflow_jobs_fail_rate_by_job_*CSV/XLSX dump with per-job/per-dayfailure/cancelledcounts,totalruns, and the corresponding fail-cancel rate percentage, and generates per-job/day fail-cancel rate SVG graphs plus an HTML report undergraphs_<repo>/.--fail-costwrites the failed/cancelled compute time lost per day to CSV and prints the same data as a fixed-width table. It also writes aworkflow_jobs_fail_cost_by_job_*CSV/XLSX dump with per-job/per-dayfailure_hours,cancelled_hours, andtotal_hours, and generates per-job/day stacked fail-cancel cost SVG graphs plus an HTML report undergraphs_<repo>/.
Additional output options:
--dump {csv,xlsx}writes the selected tabular report to--output-dir.--queuedand--runningonly write a file when--dumpis used.