AI wrote the PR.
Should you merge it?

MergeSense is a GitHub App that reviews every pull request automatically. It reads the diff, scores merge risk, and posts a plain-language comment — in about 30 seconds, before your team has even opened the tab.

Built publicly as a video series. Architecture, decisions, and tradeoffs — all documented.

What happens when you open a PR

From webhook to AI comment — the full sequence, animated.

You PR author GitHub platform App Service webhook Service Bus queue Function worker Claude AI reviewer Postgres Neon DB 1 open pull request 2 pull_request webhook 3 INSERT Review (status = pending) 4 enqueue { reviewId } 5 200 OK (under 1s) — async processing — Service Bus triggers the Function when ready — 6 trigger with reviewId 7 review this diff 8 risk score + summary MS MergeSense posted a review comment on your PR LOW RISK Score: 2/10 · Safe to merge · 3 minor notes

Animation replays on page load. Steps 1–8 = the full PR lifecycle.

Honestly scoped for v1

Not trying to replace CodeRabbit. Built to demonstrate the pattern clearly — and to be actually useful for small teams moving fast with AI-generated code.

Automatic on every PR

Install once on your org or repo. Every pull request triggers a review — no commands, no prompts from the developer. MergeSense just shows up.

Risk score + plain-language summary

Not just linting. Claude reads the diff and returns a risk score, a one-paragraph summary, and specific concerns the reviewer should check.

Queue-backed, never blocks the webhook

The webhook returns 200 OK in under a second. A Service Bus queue and Azure Function handle the slow AI work async. Your CI doesn't wait.

Review history dashboard

Sign in with GitHub OAuth and see every review MergeSense has posted across your org. Filter by repo, status, and risk level.

Open source, built publicly

Every architectural decision, every tradeoff, documented and recorded. The series shows how a real webhook-driven SaaS is designed and shipped.

Why these specific tools

Every choice is documented in the series. The short version:

Web + webhook

Next.js on Azure App Service

One deploy handles the webhook receiver and the dashboard UI. App Router keeps both concerns in the same codebase without the overhead of two services.

Queue

Azure Service Bus

The webhook must return 200 OK in under a second. Claude takes 15–30 seconds. A queue decouples the two. Service Bus gives dead-letter queues and retries out of the box.

Worker

Azure Functions

Queue-triggered. Scales to zero when idle, runs on demand. The AI review work is exactly the kind of job serverless is designed for.

Database

Neon Postgres + Prisma

Serverless Postgres that branches like Git. Three tables: User, Installation, Review. Shared by both the web app and the worker.

AI reviewer

Anthropic Claude

Reads the unified diff, returns structured JSON: risk score (1–10), summary paragraph, and an array of specific findings. Prompt design is documented in Episode 4.

Auth

GitHub App + OAuth

Two separate auth flows: the App installation grants repo permissions for webhook events, OAuth lets users sign into the dashboard.

AI writes the code. Who reviews the reviewer?

AI tools generate code faster than teams can review it. If your team is using Copilot, Cursor, or Claude to write code, you're merging more PRs with less human review time per PR. That's the tradeoff, and most teams are implicitly accepting it.

MergeSense is a small, honest version of the kind of tool that helps teams handle this gap. It doesn't replace human review — it surfaces the things worth looking at before a human even opens the diff.

I'm also building it because the webhook-to-queue-to-worker pattern is one of the most useful patterns in SaaS engineering, and I wanted a clean public example of it built with real constraints: GitHub App auth, signature verification, async processing, a real AI call, and a working dashboard.

Jitan Gupta

Jitan Gupta

Built in Mumbai · See all builds →

Build log — episode by episode

The whole build is on YouTube in Hinglish 🇮🇳. Each episode ships one layer of the stack.

Published

Episode 1 — Architecture

What MergeSense does, why the queue matters, and how the three Azure services fit together. Full architecture walk-through with diagrams.

Published

Episode 2 — GitHub App setup

Registering the GitHub App, configuring permissions and webhooks, local testing with a dev tunnel.

Upcoming

Episode 3 — Webhook to queue

Verifying the webhook signature, writing the review record, and pushing the job to Service Bus.

Upcoming

Episode 4 — AI review worker

The Azure Function that pulls the job, fetches the diff, calls Claude, and posts the comment back.

Upcoming

Episode 5 — Dashboard

Next.js App Router, GitHub OAuth, and the Neon Postgres schema behind the review history view.

Upcoming

Episode 6 — Deploy + evaluate

Azure App Service + Function App deployment via GitHub Actions, and an honest look at what Claude catches and misses.

In progress · Building publicly

Follow the build. See every decision.

Architecture, webhook design, AI prompt engineering, Azure deployment — all of it on YouTube, episode by episode. Watch it get built from a blank repo to a shipped SaaS.