Understanding the review flow

Learn how CodeReviewr processes pull requests, from webhook to GitHub comments

You push code, create a PR, and CodeReviewr starts reviewing it automatically. Here's what happens behind the scenes.

#Webhook trigger

When you create a pull request or push commits, GitHub sends a webhook to CodeReviewr. We listen for:

  • PR opened: Full review of all changes
  • PR synchronized: Incremental review of new changes only
  • PR reopened: Full review again
  • PR converted from draft: Full review when ready

Webhooks fire within seconds. No polling, no delays.

#Job queuing

Webhooks enqueue a review job in our queue system. This enables reliability, rate limiting, and fair processing of multiple PRs.

#Credit check

Before processing, we check if your workspace has sufficient credits. If you're out of credits, the review is skipped. No retroactive charges or payment holds—just simple: no credits, no reviews.

#Fetching PR data

The review worker fetches PR details from GitHub: title, description, diff, and commit history.

For incremental reviews (new commits pushed), we only fetch the diff since the last reviewed commit. This is the key to cost efficiency—no re-analyzing unchanged code.

#Size limits

Pull requests over 300KB of changes get special handling. Very large PRs often include generated code, dependency updates, or massive refactors.

CodeReviewr posts a comment explaining the PR is too large for automated review. Split it into smaller PRs for better feedback anyway.

The limit balances AI context windows with practical review sizes. Most productive PRs are much smaller.

#AI analysis

The diff gets sent to our AI review system. We use sophisticated model selection and optimization techniques to provide the best reviews at the lowest cost.

Our system:

  1. Analyzes the diff line by line
  2. Gathers context when needed (reads files, explores directories)
  3. Identifies issues (security, bugs, performance, quality)
  4. Categorizes severity (Critical, High, Medium, Low, Info)
  5. Marks solved issues from previous reviews

We've tuned our prompts and workflows to emphasize meaningful problems over style nitpicks. Security issues, bugs, and performance problems get priority.

#Issue creation and posting

For each issue found, the system creates a review issue with file path, line number, severity, category, and description. Issues are stored and automatically posted as PR review comments on GitHub.

If no issues are found, CodeReviewr posts a summary comment saying the PR looks good.

#Incremental reviews

When you push new commits to an existing PR:

  1. We fetch only the diff since the last reviewed commit
  2. The system analyzes just the new changes
  3. New issues are posted
  4. Fixed issues are marked solved and their GitHub comments are resolved

This saves credits and keeps focus on what actually changed.

#Error handling

If something goes wrong (API timeout, network issue), the job retries automatically. After multiple failed attempts, the job is marked as failed and visible in your dashboard.

#The bottom line

The flow is straightforward: webhook → queue → analyze → post. The complexity is in incremental reviews, issue tracking, and our optimization techniques. But from your perspective, it's just push code and get feedback.