CLI for analyzing a failed GitHub Actions job with Sourcegraph Deep Search.
Requires Python 3.11+ and uv.
export GITHUB_TOKEN=ghp_xxx
export SRC_ENDPOINT=https://sourcegraph.example.com
export SRC_ACCESS_TOKEN=sgp_xxx
uv run triage.py owner/repo <run_id> <job_id>By default, the CLI prints the Deep Search conversation URL so you can open the answer directly.
Add -json to print the raw triage payload instead:
uv run triage.py owner/repo <run_id> <job_id> -jsonAdd -html to also write a standalone HTML report:
uv run triage.py owner/repo <run_id> <job_id> -htmlExample:
uv run triage.py sourcegraph/sourcegraph 123456789 987654321repo: GitHub repository inowner/repoformatrun_id: GitHub Actions workflow run IDjob_id: GitHub Actions job ID
Optional environment variables:
TIMEOUT: Deep Search timeout in seconds. Default:300VERBOSITY:CRITICAL|ERROR|WARNING|INFO|DEBUG. Default:INFO
By default, the CLI prints the Deep Search conversation URL to stdout.
Pass -json to print the full triage payload instead.
Pass -html to also write an HTML report to the current directory.
With -json, the payload includes:
conversation_urlerror_context_summaryanalysis_markdown
When -html is passed, the JSON also includes:
analysis_html_path
uv run pytest -q