Skip to content

sourcegraph-community/deepsearch-gha-triage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deep-search-triage

CLI for analyzing a failed GitHub Actions job with Sourcegraph Deep Search.

Quick Start

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> -json

Add -html to also write a standalone HTML report:

uv run triage.py owner/repo <run_id> <job_id> -html

Example:

uv run triage.py sourcegraph/sourcegraph 123456789 987654321

Inputs

  • repo: GitHub repository in owner/repo format
  • run_id: GitHub Actions workflow run ID
  • job_id: GitHub Actions job ID

Optional environment variables:

  • TIMEOUT: Deep Search timeout in seconds. Default: 300
  • VERBOSITY: CRITICAL|ERROR|WARNING|INFO|DEBUG. Default: INFO

Output

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_url
  • error_context_summary
  • analysis_markdown

When -html is passed, the JSON also includes:

  • analysis_html_path

Development

uv run pytest -q

About

Triage GitHub Actions failures using the Deep Search API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages