def get_last_daily_ci_runs(token):
    """Get the last completed workflow run id of the scheduled (daily) CI."""
    workflow_runs = get_daily_ci_runs(token)
    workflow_run_id = None
    for workflow_run in workflow_runs:
        if workflow_run["status"] == "completed":
            workflow_run_id = workflow_run["id"]
            break

    return workflow_run_id
Get the last completed workflow run id of the scheduled (daily) CI.
dpkd/transformers/utils/get_previous_daily_ci.py