rlsbl v0.92.0 /rlsbl.commands.watch
On this page

Watch command that polls GitHub Actions CI workflow runs for a given commit SHA, reports pass/fail/in-progress status, and suggests retry on failure.

#rlsbl.commands.watch

#rlsbl.commands.watch

Watch command that polls GitHub Actions CI workflow runs for a given commit SHA and reports pass, fail, or in-progress status.

#_open_url

python
def _open_url(url)

Open a URL in the default browser. Non-fatal if unavailable.

#_release_url

python
def _release_url(repo_slug)

Try to find the latest release tag and return its GitHub URL. Returns None on failure.

#_notify

python
def _notify(title, body, url=None)

Send a desktop notification. If url is provided, opens it only when the user clicks the notification action.

#_retry_workflow

python
def _retry_workflow(workflow_name, branch, repo_slug, label)

Re-trigger a workflow once and watch the retry run.

Returns a result dict with name, passed, and run_id. Returns None if the retry could not be triggered or found.

#_watch_single_run

python
def _watch_single_run(ci_run, label, repo_slug, retried_lock=None, retried_workflows=None)

Watch a single CI run. Returns a dict with name, passed, and run_id.

When retried_lock and retried_workflows are provided, deduplicates retries so that only one retry is dispatched per workflow name even when multiple runs from the same workflow fail concurrently.

#_watch_runs

python
def _watch_runs(runs, label, repo_slug)

Watch all runs in parallel (or directly if only one). Returns list of result dicts.

#_has_publish_workflow_on_disk

python
def _has_publish_workflow_on_disk()

Check if any .github/workflows file looks like a publish workflow.

#_is_publish_workflow

python
def _is_publish_workflow(name)

Return True if the workflow name matches a publish/deploy/release pattern.

#_print_workflow_audit

python
def _print_workflow_audit(results)

Print a summary of which workflows ran and flag missing publish workflows.

Returns True if a missing-publish warning was printed (for testability).

#_resolve_run_ids

python
def _resolve_run_ids(run_ids)

Resolve run IDs to run info dicts via gh run view.

#poll_runs

python
def poll_runs(commit_sha, max_attempts=30, interval=4)

Poll gh run list until at least one run appears.

Returns a list of run dicts (may be empty if nothing found after all attempts). Default timeout is ~120s (30 attempts * 4s interval).

#run_cmd

python
def run_cmd(registry, args, flags)

Watch all CI runs for a commit until they complete.

Usage: rlsbl watch [] rlsbl watch --run-id [--run-id ] Defaults to HEAD if no commit SHA is provided.