AI agents: read /llms.txt for the documentation index or append .md to any guide URL for raw Markdown.
Skip to content

GitHub Action ​

The MergeJudge GitHub Action (gauravsharmaGG/mergejudge-runner@v1) is an open-source AI pull request reviewer that runs in your own GitHub Actions runner with your own AI key, and sorts every pull request into an auto, review or block lane.

The MergeJudge GitHub Action runs the review inside your own GitHub Actions runner, with your own AI key (or rules-only, with no key at all). The engine and the Action are open source (MIT) in the public mergejudge-runner repository, and it is the same engine the hosted service uses.

Also listed on the GitHub Marketplace.

Three steps, no MergeJudge account:

  1. Add your AI key as a repo secret: gh secret set AI_API_KEY. No key? Use provider: none for a rules-only review.
  2. Save this file as .github/workflows/mergejudge.yml (the homepage Copy button copies the same file).
  3. Open a pull request. The lane, a summary comment and line comments land on it.
yaml
# .github/workflows/mergejudge.yml
name: MergeJudge
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
permissions:
  contents: read
  pull-requests: write
  checks: write
jobs:
  lane:
    runs-on: ubuntu-latest
    steps:
      - uses: gauravsharmaGG/mergejudge-runner@v1
        env:
          AI_API_KEY: ${{ secrets.AI_API_KEY }}   # omit for rules-only
        with:
          provider: anthropic                     # or openai, zai, openai-compatible, none
          model: your-model-name                  # check your provider's docs for current names
          api_key_env: AI_API_KEY

AI_API_KEY is your own Anthropic, OpenAI or z.ai key, stored as a GitHub secret. MergeJudge doesn't issue keys. Leave it out for free rules-only reviews.

  • Lanes. Every PR gets a lane (auto, review or block) from deterministic rules; the AI step can only raise it. The lane is posted as a comment and a mergejudge/lane check.
  • Your key, your provider. With a key, the diff (and, in context or deep mode, related code) is sent to the AI provider you chose, under your account. Without a key nothing goes to an AI provider and only the rules run.
  • Deep mode. Add an actions/checkout step and set review.mode: deep in .mergejudge.yml to give the model context from the checked-out files (callers, imports, and files mentioning what changed). Details and limits are in the README.
  • Security review (optional). Set review.security: true in .mergejudge.yml for a short security checklist on each review (injection, authorization, secrets and crypto, webhooks and SSRF, AI tools). Off by default; a release that does not know the key ignores it. See Security review mode.
  • Learning. Feedback on the sticky comment and a scheduled run (the schedule you set) can turn into a proposal pull request. The Action does not feed lessons into the AI prompt; lessons only feed proposal PRs. See the README for the full workflow.
  • Fork PRs. Forks get a read-only token and no secrets, so they run rules-only and may be unable to comment. Restrict the job to same-repository branches if you want to avoid failures.
  • Version. Use @v1.

FAQ ​

Is there an AI code review GitHub Action that runs with my own API key? ​

Yes. The MergeJudge GitHub Action, uses: gauravsharmaGG/mergejudge-runner@v1, runs the whole review in your own GitHub Actions runner. You pass your own key for Anthropic, OpenAI, z.ai or any OpenAI-compatible endpoint, and it needs no MergeJudge account. With no key it runs the deterministic rules only.

What does the MergeJudge Action post on a pull request? ​

A sticky summary comment, line comments on the diff, and a mergejudge/lane check: success for auto, neutral for review and failure for block.

Is the MergeJudge GitHub Action open source? ​

Yes. The Action and the review engine are MIT-licensed in the public gauravsharmaGG/mergejudge-runner repository, and it is listed on the GitHub Marketplace as MergeJudge AI Code Review.

Does the Action work on pull requests from forks? ​

Forks get a read-only token and no secrets, so the review runs rules-only and may be unable to comment. Restrict the job to same-repository branches to avoid failed runs.

A complete workflow with secrets, deep mode, learning and a data table is in Self-hosted AI code review GitHub Action.

Prefer not to run anything in your own workflow? Install the GitHub App for the hosted service, or keep the model step on your own machine with the open-source runner.

The MergeJudge runner is open source (MIT). MergeJudge doesn't merge pull requests itself. MergeJudge is not affiliated with or endorsed by GitHub. Sign in · Impressum · Privacy · Terms · Cookie settings