User Guide
lazyPR analyzes your code diffs—not just commit messages—to generate intelligent PR summaries, risk assessments, and reviewer guidance.
Quick Start
Add lazyPR to your repository in under 5 minutes:
# .github/workflows/lazypr.yml
name: lazyPR
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
summarize:
runs-on: ubuntu-latest
steps:
- uses: elvis-ndubuisi/lazypr@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
api_key: ${{ secrets.OPENAI_API_KEY }}
provider: openai
Full setup instructions: See the GitHub repository
Core Features
AI-Powered Summaries
Unlike tools that parrot commit messages, lazyPR reads the actual code changes:
- Context-aware: Understands what changed, not just that something changed
- Multi-provider: Works with OpenAI, Anthropic, or Gemini
- Customizable: Use built-in templates or create your own
What you get: A concise summary in your PR description that reviewers can scan in seconds.
Ghost Commit Detection
Catches commits where the message doesn’t match the actual changes:
- Compares commit message keywords against the diff
- Flags mismatches automatically
- Helps prevent “fixed auth” commits that actually changed database schemas
Why it matters: Reduces confusion and ensures documentation accuracy.
Impact Scoring & Risk Labels
Every PR gets automatically labeled based on file sensitivity:
| Risk Level | Score | Examples |
|---|---|---|
| Low | 0-33 | Documentation, tests, config files |
| Medium | 34-66 | Feature additions, refactoring |
| High | 67-100 | Database changes, auth modifications, security fixes |
Benefit: Reviewers instantly know which PRs need the most scrutiny.
What’s New in v1.2.0
Batch 1 features expand lazyPR’s capabilities:
Ticket Detection
Auto-extracts JIRA, GitHub, and Linear tickets from PRs and links them automatically.
Title Enhancement
Analyzes vague titles like “fix bug” and branch names like “feat/auth” using hybrid pattern + AI approach. Suggests descriptive alternatives with minimal API cost.
Custom Placeholders
Define dynamic template variables for team-specific workflows (security reviews, QA checklists, etc.).
PR Size Detection
Warns on oversized PRs and optionally blocks massive ones to encourage better practices.
Configuration
Required Inputs
api_key: Your AI provider API keygithub_token: GitHub token (auto-provided by Actions)
Optional Inputs
| Input | Description | Default |
|---|---|---|
provider | AI provider (openai/anthropic/gemini) | openai |
template | Built-in preset (default/concise/verbose/security) | default |
custom_template | Enable custom templates | true |
ticket_pattern | Regex for ticket detection | — |
auto_update_title | Fix vague PR titles | false |
vagueness_threshold | Aggressiveness for title updates (0-100) | 40 |
pr_size_warning | Warn if PR exceeds N lines | 500 |
See individual feature docs for detailed configuration.
Outputs
lazyPR provides several outputs for downstream use:
summary: Generated markdown summaryrisk_level: LOW / MEDIUM / HIGHimpact_score: 0-100 numerical scorehas_ghost_commits: true/falserelated_tickets: Markdown list of detected ticketsenhanced_title: Improved PR title (if vague), empty otherwisepr_size_lines: Total lines changed
Permissions
lazyPR requires write access to:
- PR body updates (
pull-requests: write) - Label management (
issues: write)
Note: Fork PRs may have restricted permissions. See troubleshooting for workarounds.
Built with TypeScript, Bun, and AI. See custom templates for advanced usage.