binhmuc/autobot-review

AI-powered GitLab code review bot using Azure OpenAI Haiku 4.5. Automated security checks, performance analysis, and inline comments on merge requests with smart batching and false positive filtering.

21 stars3 forksUpdated Dec 29, 2025
npx skills add binhmuc/autobot-review

README

ReviewBot - AI-Powered GitLab Code Review System

NestJS React TypeScript PostgreSQL Azure OpenAI

Automated code review bot for GitLab using Azure OpenAI Haiku 4.5. Provides intelligent code analysis, security checks, performance suggestions, and inline comments directly on merge requests.

šŸ“ø Screenshots

Dashboard

Dashboard Overview Real-time metrics showing code quality scores, issue breakdown, and review history

GitLab Integration

Inline Comments AI-powered inline comments directly on merge request code changes

MR Summary Comprehensive merge request summary with quality score and categorized issues

Developer Analytics

Developer Metrics Track individual developer performance and improvement trends over time

Note: Add your screenshots to the /images folder to display them here.

🌟 Features

Code Review Intelligence

  • AI-Powered Analysis: Utilizes Azure OpenAI Haiku 4.5 for fast, accurate code reviews
  • Multi-Language Support: Analyzes TypeScript, JavaScript, Python, Java, Go, Rust, PHP, and more
  • Smart Batching: Combines multiple file changes into single LLM call for efficiency (≤500 lines)
  • False Positive Filtering: Verifies LLM findings against actual file content to reduce noise

Review Capabilities

  • Inline Comments: Posts comments directly on specific code lines for critical/high/medium issues
  • Comprehensive Summary: Detailed MR-level summary with quality scores and issue breakdown
  • Issue Categorization:
    • Severity: Critical, High, Medium, Low
    • Type: Security, Performance, Logic, Style
  • Context-Aware: Includes ±10 lines of context and imports for accurate analysis

Developer Metrics

  • Quality Scoring: 0-100 score based on issue severity
  • Historical Tracking: Review history and trends per developer
  • Project Analytics: Aggregate metrics across projects

Integration

  • GitLab Webhooks: Automatic review on MR open/update
  • Queue Processing: Async job processing with Bull + Redis
  • API Access: RESTful API for frontend consumption

šŸ—ļø Architecture

reviewbot/
ā”œā”€ā”€ reviewbot-backend/     # NestJS API + Queue Processor
│   ā”œā”€ā”€ src/
│   │   ā”œā”€ā”€ webhook/       # GitLab webhook receiver
│   │   ā”œā”€ā”€ llm/           # Azure OpenAI integration
│   │   ā”œā”€ā”€ queue/         # Bull queue processing
│   │   ā”œā”€ā”€ gitlab/        # GitLab API client
│   │   └── prisma/        # Database models
│   ā”œā”€ā”€ prisma/            # Database schema
│   └── docker-compose.yml # Infrastructure stack
│
└── reviewbot-frontend/    # React + Vite Dashboard
    └── src/
        ā”œā”€ā”€ pages/         # Dashboard, Projects, Developers, Reviews
        ā”œā”€ā”€ components/    # Reusable UI components
        └── api/           # API client

Tech Stack

Backend:

  • NestJS (Node.js framework)
  • Prisma ORM
  • PostgreSQL (database)
  • Redis + Bull (queue processing)
  • Azure OpenAI API (Haiku 4.5)
  • GitLab REST API (@gitbeaker/rest)

Frontend:

  • React 19
  • Vite (build tool)
  • TanStack Query (data fetching)
  • Tailwind CSS + shadcn/ui
  • Recharts (visualization)

šŸ“‹ Prerequisites

  • Node.js: v18+ (backend and frontend)
  • Docker & Docker Compose: For PostgreSQL and Redis
  • Azure OpenAI: API key and Haiku 4.5 deployment
  • GitLab: Personal access token with API scope
  • Git: For version control

šŸš€ Quick Start

1. Clone Repository

git clone <your-repo-url>
cd reviewbot

2. Backend Setup

cd reviewbot-backend

# Install dependencies
npm install

# Copy environment template
cp .env.example .env

# Edit .env with your credentials
nano .env

Required Environment Variables:

# Database
DATABASE_URL=postgresql://reviewbot:your_password@localhost:5432/reviewbot
DB_PASSWORD=your_password

# Redis
REDIS_HOST=localhost
REDIS_PORT=6379

# Azure OpenAI
AZURE_OPENAI_KEY=your_api_key
AZURE_OPENAI_ENDPOINT=https://your-resource.cognitiveservices.azure.com/
AZURE_OPENAI_DEPLOYMENT=haiku-4-5
AZURE_OPENAI_MODEL_NAME=haiku-4-5

# GitLab
GITLAB_HOST=https://gitlab.com
GITLAB_WEBHOOK_SECRET=your_webhook_secret
GITLAB_ACCESS_TOKEN=your_gitlab_token

# Auth
JWT_SECRET=your_jwt_secret
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change_me

3. Start Infrastructure


...
Read full README

Publisher

binhmucbinhmuc

Statistics

Stars21
Forks3
Open Issues0
CreatedDec 29, 2025