AI-driven Pull Request review & Issue triaging for Open Source maintainers.
Stop drowning in PRs. Let AI handle the first pass.
Open-source maintainer burnout is real. Popular repositories get flooded with pull requests and issues that need review, triaging, and labeling β and most of that work is repetitive. 60% of OSS maintainers report burnout, and the #1 cause is the sheer volume of contributions needing review.
OSSTriage is a CLI tool and GitHub Action that uses AI (via DSPy) to:
- π Review Pull Requests β Automatically analyse diffs for security risks, performance issues, logic flaws, and code quality
- π·οΈ Triage Issues β Suggest labels, assign priority scores, and summarise issue content
- π€ Reduce Toil β Let maintainers focus on the decisions that matter, not the first-pass review drudgery
OSSTriage doesn't replace humans β it gives maintainers a structured, AI-generated starting point for every PR and issue.
osstriage/
βββ src/osstriage/
β βββ cli.py # Typer CLI entry points
β βββ github_client.py # GitHub API wrapper (PyGithub)
β βββ core/
β β βββ config.py # Settings from env / .env
β β βββ logging.py # Rich-powered structured logging
β β βββ exceptions.py # Custom exception hierarchy
β βββ dspy_modules/
β βββ signatures.py # DSPy I/O signatures
β βββ review_pr.py # ReviewPRModule (ChainOfThought)
β βββ triage_issue.py # TriageIssueModule (ChainOfThought)
βββ .github/workflows/
β βββ osstriage-ci.yml # Ready-to-use GitHub Action
βββ action.yml # Composite action for marketplace
βββ pyproject.toml # uv-compatible project manifest
βββ README.md
Why DSPy? Unlike LangChain's prompt-centric approach, DSPy uses programmatic logic compilation β you define typed signatures and let the framework optimise the prompts. This makes the AI modules testable, composable, and reliable.
- Python 3.13+
- uv (modern Python package manager)
- A GitHub Personal Access Token
- An OpenAI API key
# Install as a CLI tool (recommended)
uv tool install osstriage
# Or clone and install locally for development
git clone https://github.com/koomatoz/osstriage.git
cd osstriage
uv syncCreate a .env file (or export the variables in your shell):
cp .env.example .env
# Edit .env with your actual tokens| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
β | GitHub PAT with repo scope |
OPENAI_API_KEY |
β | OpenAI API key |
OSSTRIAGE_LOG_LEVEL |
β | DEBUG, INFO (default), WARNING, ERROR |
OSSTRIAGE_MODEL |
β | LLM model (default: gpt-4o) |
# Full review with GitHub comment
osstriage review-pr https://github.com/owner/repo/pull/42
# Dry run (only show results locally, don't post to GitHub)
osstriage review-pr https://github.com/owner/repo/pull/42 --dry-run
# Use a specific model
osstriage review-pr https://github.com/owner/repo/pull/42 --model gpt-4o-mini
# Verbose output for debugging
osstriage review-pr https://github.com/owner/repo/pull/42 -v- π Security risks β injection, exposed secrets, unsafe deserialization
- β‘ Performance issues β N+1 queries, unnecessary allocations, blocking calls
- π Logic flaws β off-by-one errors, missing edge cases, race conditions
- π‘ Suggestions β naming, structure, documentation, best practices
# Triage and display results
osstriage triage-issue https://github.com/owner/repo/issues/7
# Triage and automatically apply labels
osstriage triage-issue https://github.com/owner/repo/issues/7 --apply-labels
# Dry run
osstriage triage-issue https://github.com/owner/repo/issues/7 --dry-run- π·οΈ Suggested labels β
bug,feature,docs,security,good-first-issue, etc. - π Priority score β 1 (low) to 5 (critical) with justification
- π Summary β Concise 1-2 sentence description
- π€ Ideal expertise β What skills are needed to address the issue
# Scaffold the workflow file into .github/workflows/
osstriage setup-actionCopy .github/workflows/osstriage-ci.yml to your repository, then add these secrets:
| Secret | Description |
|---|---|
OPENAI_API_KEY |
Your OpenAI API key |
GITHUB_TOKENis automatically provided by GitHub Actions.
name: AI Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: koomatoz/osstriage@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
model: "gpt-4o"
command: "review-pr"# Clone and set up dev environment
git clone https://github.com/koomatoz/osstriage.git
cd osstriage
uv sync
# Run the CLI during development
uv run osstriage --help
# Run tests
uv run pytest
# Lint with ruff
uv run ruff check src/
uv run ruff format src/- DSPy optimisation β Compile review modules with labelled examples for higher accuracy
- Multi-LLM support β Anthropic Claude, Google Gemini, local Ollama models
- Inline comments β Post review feedback as inline PR comments on specific lines
- Custom rules β Allow repos to define
.osstriage.ymlwith project-specific review guidelines - Batch mode β Triage all open issues in a repository at once
- Metrics dashboard β Track review accuracy and time saved
Contributions are welcome! This project exists to help the OSS community, and we'd love your help making it better.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting (
uv run pytest && uv run ruff check src/) - Commit and push (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ for the open-source community.
Because maintainers deserve sleep too.