INNER CODE UNIT · Python

all_jobs

wolfSSL/wolfssl-examples · .github/scripts/ci_triage.py:65

def all_jobs(run_id, attempt=None):
    base = f"/repos/{REPO}/actions/runs/{run_id}"
    base += f"/attempts/{attempt}/jobs" if attempt else "/jobs"
    jobs, page = [], 1
    while True:
        got = gh(f"{base}?per_page={JOBS_PER_PAGE}&page={page}").get("jobs", [])
        jobs += got
        if len(got) < JOBS_PER_PAGE:
            return jobs
        page += 1


# --- retry: poll, do not trampoline ----------------------------------------
#
# wolfProvider POSTs rerun-failed-jobs and returns, relying on the rerun
# re-firing workflow_run. Three paths then produce a GREEN triage run with zero
# output: the rerun never schedules; a 5xx on the POST raises out of main(); and
# the GITHUB_TOKEN loophole it leans on is undocumented behavior used as control

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…