GitHub App · TypeScript + NestJS

AI code review
for GitHub App

PR Agent focuses on GitHub App workflows: automatic pull request review, structured summaries, policy-aware feedback, and operational endpoints for real-world rollout.

GitHub App only · PR review focused

Turn webhook intake into review output that actually fits engineering flow.

Overview

Not just a summary generator.

Built for real PR/MR review workflows.

PR Agent is built with TypeScript + NestJS and designed around real GitHub and GitLab collaboration paths. It supports automatic review as well as comment commands for Q&A, checks, test drafting, and documentation help.

Supports GitHub App, GitHub Webhook, and GitLab Webhook modes.
Supports comment/report modes with line-aware diff mapping.
Uses .pr-agent.yml for policy reminders, command switches, and review guardrails.
Runtime Highlights

Reduce repeated AI work.

Keep the review context that matters.

This is not a single review prompt wrapped in a UI. It is a runtime built around triggers, dedupe, policy, metrics, and debugging loops.

View Operations

Incremental Review State

Core

Only reviews new commits since the previous run, reducing repeated comments and repeated AI work.

New commits only
Lower repeated token cost

Dedupe Protection

Runtime

Automatic triggers and comment commands both use dedupe windows to avoid duplicate executions after redelivery.

5 min command window
Merged reports configurable

Policy + Process Checks

Governance

Understands workflows, templates, CODEOWNERS, and CONTRIBUTING files, then emits process-aware feedback.

remind / enforce
GitHub Check integration

Observability + Replay

Ops

Exposes health checks, Prometheus metrics, and replay tooling for debugging real webhook traffic.

GET /health /metrics
GitHub + GitLab replay

Incremental Review State

Core

Only reviews new commits since the previous run, reducing repeated comments and repeated AI work.

New commits only
Lower repeated token cost

Dedupe Protection

Runtime

Automatic triggers and comment commands both use dedupe windows to avoid duplicate executions after redelivery.

5 min command window
Merged reports configurable

Policy + Process Checks

Governance

Understands workflows, templates, CODEOWNERS, and CONTRIBUTING files, then emits process-aware feedback.

remind / enforce
GitHub Check integration

Observability + Replay

Ops

Exposes health checks, Prometheus metrics, and replay tooling for debugging real webhook traffic.

GET /health /metrics
GitHub + GitLab replay
Workflow

From webhook setup

to observable runtime.

If you only want a fast validation, start with one real PR. If you want production rollout, keep going until policy, runtime state, and monitoring are in place.

Stage 1

Platform Setup

Choose GitHub App, plain GitHub webhook, or GitLab webhook first, then configure secrets, webhook URLs, and your AI provider.

GitHub / GitLab intake
OpenAI / Claude / Gemini
Stage 2

Review Triggers

Run automatically on PR or MR lifecycle events, or trigger targeted work from the comment thread with commands.

Automatic + manual triggers
Comment / report modes
Stage 3

Observe + Tune

Use /health, /metrics, platform health endpoints, and replay tooling to keep the runtime observable and debuggable.

Prometheus metrics
Health checks + replay
See Deployment Baseline
Product Focus

Review output is only part of it.

Commands, policy, and runtime controls matter too.

GitHub AppGitHub WebhookGitLab WebhookOpenAI CompatibleClaudeGeminiSQLitePrometheusReplay.pr-agent.yml
View Scenarios

The PR thread becomes the control surface.

Run /ai-review, /ask, /checks, /generate_tests, /describe, /changelog, /improve, and more directly inside code review discussions.

Incremental ReviewCore

Only reviews the new commit range so old comments do not get replayed forever.

Auto-labeling

Can infer bugfix, feature, refactor, docs, and security labels from diff content.

Process ComplianceGitHub

Pre-checks issue and pull request flows against repository templates and process files.

Feedback SignalsLearning

Stores reviewer preference signals through feedback commands and review-thread state.

Commands + Scenarios

The PR thread is not just output.

It is also the operator interface.

Auto review is useful as a default pass. Comment commands matter when you need targeted follow-up inside a live discussion.

See Workflow
Deployment Modes

Choose the integration path first.

Then complete the rollout baseline.

The repository README already gives a practical rollout order: choose platform mode, configure model provider, enable durable runtime state, verify health, then test inside a real PR or MR.

Recommended

GitHub App

Best overall coverage with a cleaner permission model, making it the preferred path for long-running production use.

01/ mode
Best coverage
Most complete feature path
Fits long-running production use
Compatible

GitHub Webhook

A good fit when you want direct webhook integration and a faster first validation for automatic review and commands.

02/ mode
Fast validation
Lower setup cost
Good for trial rollout
Optional

GitLab Webhook

Keeps GitLab support in play and allows review-mode override through headers for platform-specific rollout control.

03/ mode
As needed
Supports x-ai-mode override
Useful for mixed platform teams
View Operations
Operations

Do not stop at review output.

Make the runtime observable.

The real question after rollout is whether you can quickly tell if webhook delivery, provider configuration, or platform setup is failing.

/health
Liveness + Deep Probe
/metrics
Prometheus Metrics
replay
Stored Event Replay
Read FAQ
Rollout Path

From trial run to production.

A more realistic two-step path.

Instead of fake pricing, this section reflects the actual rollout maturity the repository suggests: validate quickly first, then harden for production.

Quick Start

Trial Run

30 min
/ first pass

Best for validating one repository and one real pull request before expanding usage.

1
test repo
1
real PR
Configure AI provider and model
Set webhook URL and secret
Run /ai-review in a comment thread
Verify /health and platform health endpoints
Start First Validation
Production

Baseline

Prod-ready
/ rollout

Best for teams that want durable runtime state, policy controls, and operational visibility as defaults.

sqlite
state
metrics
observability
Prefer GitHub App where possible
Enable durable runtime state
Use remind / enforce policy mode as needed
Keep replay available for incident debugging
View Deployment Modes
Fit Profiles

Built for teams that want AI review

inside normal engineering flow.

These are rollout profiles, not fictional customer quotes. They map the repository capabilities to the kinds of teams that actually need them.

View Commands

We need one review baseline across many repositories and want structured feedback to appear automatically when a PR opens.

P
Platform Engineering
Multi-repo governance · GitHub App + Policy

We want a conservative first rollout, using commands in comment threads before enabling more automatic behavior.

A
Application Team
Gradual adoption · Comment Commands

We need one toolchain that can support both GitHub and GitLab instead of maintaining separate review surfaces.

M
Mixed Platform Team
Cross-platform workflow · GitHub + GitLab

We care about workflows, templates, and CODEOWNERS changes as much as application code changes.

R
Repository Administrators
Process compliance · .pr-agent.yml

After rollout, the real requirement is observability, because debugging webhook, provider, and runtime issues needs clear endpoints.

O
Ops / SRE
Production stability · Health + Metrics + Replay

We need the freedom to switch among providers depending on cost, quality, and deployment constraints.

A
AI Platform Lead
Provider governance · Multi-provider setup
FAQ

Common Questions

These answers are aligned with the current repository README and the sibling web project, not invented marketing promises.

The repository currently supports GitHub App, plain GitHub Webhook, and GitLab Webhook. GitHub App is the recommended path because it has the cleanest permissions model and the broadest tested coverage.

Get Started

Run PR Agent on a real pull request.

Then decide how far to roll it out.

If you only do one thing, wire a webhook, verify /health, and run /ai-review inside a comment thread. That reveals more than another static mockup ever will.

View Deployment Modes