Skip to content

GitHub Integration

Quickest way

pip install mergemate-review
mergemate-review init

This auto-creates .mergemate.toml and .github/workflows/mergemate.yml. Just add your API key secret and push.

Manual setup

1. Create the workflow

Put this in .github/workflows/mergemate.yml:

name: MergeMate
on:
  pull_request:
    types: [opened, synchronize]
  issue_comment:
    types: [created]
jobs:
  review:
    if: ${{ github.event.sender.type != 'Bot' }}
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write
      contents: write
    steps:
      - uses: mergemate/mergemate@main
        env:
          DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          config.model: "deepseek/deepseek-v4-flash"

2. Add your API key

Repo → Settings → Secrets → Actions → New secret:

3. Push

git add .github/workflows/mergemate.yml
git commit -m "Add MergeMate"
git push

4. Open a PR

MergeMate posts a review. Comment /describe, /improve, or /ask "question" on the PR for more.


Using other AI models

Swap the env vars:

Model Set this
DeepSeek DEEPSEEK_API_KEY
OpenAI OPENAI_KEY
Anthropic ANTHROPIC_KEY
Google Gemini GEMINI_API_KEY

And update config.model:

# DeepSeek (default)
config.model: "deepseek/deepseek-v4-flash"

# OpenAI
config.model: "gpt-4o"

# Anthropic
config.model: "claude-sonnet-4-20250514"

Advanced: trigger specific tools automatically

env:
  github_action_config.auto_review: "true"
  github_action_config.auto_describe: "true"
  github_action_config.auto_improve: "true"

Full config options →