Skip to content

PRception – An AI-powered PR reviewer that perceives and perfects your code.

Notifications You must be signed in to change notification settings

Bl4ck-h00d/PRception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 PRception - AI-Powered PR Review & Approval Bot 🤖

PRception is a GitHub App that automates pull request reviews using AI-powered code analysis. It provides intelligent, context-aware feedback, suggests improvements, and can automatically approve PRs that meet defined quality standards — saving developers time and ensuring consistent code quality.

✨ Features

Automated Code Review – PRception analyzes code changes using GPT-4 and posts suggestions directly in the PR
Automatic Approval – PRception can automatically approve PRs if they meet quality criteria
Context-Aware Feedback – Provides line-by-line feedback based on code context
Diff Analysis – Analyzes PR diffs to detect issues and improvements
Customizable Review Rules – Define custom rules and quality standards
Chat with PRception – Allows developers to ask follow-up questions directly in the PR comments and receive AI-powered responses.
Secure Authentication – Uses GitHub App with JWT-based authentication
Scalable – Works seamlessly with large repositories and complex codebases
Multi-Repo Support – Supports reviewing across multiple repositories in an organization


📋 Prerequisites

Ensure you have the following installed:

  • 🏆 Go (1.22 or higher)
  • 🐳 Docker (latest version recommended)
  • 🔑 GitHub App credentials (App ID and Private Key)
  • 🧠 OpenAI API key

🔑 Environment Variables

Create a .env file in the project root with the following:

GITHUB_APP_ID=your_app_id
GITHUB_PRIVATE_KEY=your_base64_encoded_private_key
OPENAI_API_KEY=your_openai_api_key

🚀 Installation

1️⃣ Clone the repository:

git clone https://github.com/yourusername/prception.git
cd prception

2️⃣ Install dependencies:

go mod download

3️⃣ Set up your GitHub App:

  1. Go to GitHub → Settings → Developer Settings → GitHub Apps

  2. Create a new app

  3. Set the following permissions:

  • ✅ PR read/write
  • ✅ Contents read
  1. Subscribe to Pull Request event

  2. Generate and download the private key

  3. Install the app in your repository

4️⃣ Build and run locally:

./scripts/start.sh

🐳 Docker Deployment

You can deploy PRception using Docker for easy scalability and portability:

Build the container:

docker build -t prception .

Run the container:

docker run -d -p 8080:8080 --env-file .env prception

🔄 How It Works

  1. A PR is opened → GitHub sends a webhook to PRception
  2. PRception fetches the PR diff and changed files
  3. Code is analyzed using GPT-4 to detect issues and improvements
  4. Intelligent review comments are posted directly on the PR
  5. If the code meets the defined standards, PRception automatically approves the PR

💬 New! Chat Feature

PRception now supports an interactive chat feature!

Mention @prception in a PR comment Reply to ask follow-up questions about the code review. PRception will respond with context-aware answers based on the diff and file content. Example:

@prception Why is this loop inefficient?

🏆 Example PR Feedback

GitHub Logo

GitHub Logo

About

PRception – An AI-powered PR reviewer that perceives and perfects your code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published