Skip to content

GitHub Action ​

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.

yaml
# .github/workflows/mergejudge.yml
name: MergeJudge
on:
  pull_request:
    types: [opened, synchronize, reopened, labeled, unlabeled]
permissions:
  contents: read
  pull-requests: write
  checks: write
jobs:
  lane:
    runs-on: ubuntu-latest
    steps:
      - uses: gauravsharmaGG/mergejudge-runner@v1
        env:
          MJ_API_KEY: ${{ secrets.MJ_API_KEY }}   # your own key; omit it (or set provider: none) for rules-only
        with:
          provider: anthropic          # or openai-compatible, or none
          model: your-model-name
          api_key_env: MJ_API_KEY
  • 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.
  • Learning. Feedback on the sticky comment and a weekly schedule run can turn into a proposal pull request. 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.

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 never merges pull requests itself. MergeJudge is not affiliated with or endorsed by GitHub. Sign in · Impressum · Privacy · Terms