← Back to Projects
Developer Tools

AI PR Reviewer Agent

Automated GitHub Action that reviews Pull Requests for bugs, security, and styles using OpenAI GPT-4.

The Challenge

Code reviews were blocking deployments, and senior engineers were wasting time on minor style nits and pattern matching instead of architecture.

The Solution

Integrated an AI agent into GitHub Actions that reviews PRs for style, security, and basic bugs before a human ever sees it. It posts comments directly on lines of code.

Demo

AI PR Reviewer Agent

Key Results & Impact

  • Review turnaround time improved by 40%
  • Detected 15 critical security flaws pre-merge
  • Saved approx. 10 engineering hours/week

Under the Hood

yaml
name: AI PR Reviewer
on: [pull_request]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run AI Reviewer
        uses: aavnishyadav/ai-reviewer@v1
        with:
          openai_key: ${{ secrets.OPENAI_API_KEY }}
          github_token: ${{ secrets.GITHUB_TOKEN }}

My Role

  • Workflow logic
  • Prompt engineering
  • CI Integration

Tools Used

  • GitHub Actions
  • OpenAI
  • TypeScript
  • Octokit

Tech Stack

GitHub ActionsGitHub Actions
TypeScriptTypeScript
OpenAIOpenAI

Key Features

  • Automated line-by-line code comments
  • Security vulnerability detection
  • Customizable severity levels (Info, Warning, Critical)
  • Integration with GitHub Actions