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 LevelScoreExamples
Low0-33Documentation, tests, config files
Medium34-66Feature additions, refactoring
High67-100Database 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 key
  • github_token: GitHub token (auto-provided by Actions)

Optional Inputs

InputDescriptionDefault
providerAI provider (openai/anthropic/gemini)openai
templateBuilt-in preset (default/concise/verbose/security)default
custom_templateEnable custom templatestrue
ticket_patternRegex for ticket detection
auto_update_titleFix vague PR titlesfalse
vagueness_thresholdAggressiveness for title updates (0-100)40
pr_size_warningWarn if PR exceeds N lines500

See individual feature docs for detailed configuration.


Outputs

lazyPR provides several outputs for downstream use:

  • summary: Generated markdown summary
  • risk_level: LOW / MEDIUM / HIGH
  • impact_score: 0-100 numerical score
  • has_ghost_commits: true/false
  • related_tickets: Markdown list of detected tickets
  • enhanced_title: Improved PR title (if vague), empty otherwise
  • pr_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.