Back to directory
tarmojussila avatar
tarmojussila / minimax-code-review

minimax-code-review

MiniMax Code Review for GitHub Actions

18

Stars

9

Forks

2

Watchers

MIT

License

MiniMax Code Review

AI-powered GitHub Pull Request code review using MiniMax models. Automatic PR comments, bug detection, and improvement suggestions via GitHub Actions.

Features

  • 🚀 Detect bugs
  • 🔍 Suggest improvements
  • 🧠 AI-driven PR feedback
  • ⚡ Works with GitHub Actions

Quickstart

Add this to your .github/workflows/code-review.yml:

name: AI Code Review with MiniMax

on:
  pull_request:
    types: [opened, synchronize]

permissions:
  pull-requests: write

jobs:
  review:
    name: Review
    runs-on: ubuntu-latest
    steps:
      - name: Code Review
        uses: tarmojussila/[email protected]
        with:
          MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}

Inputs

Input Required Default Description
MINIMAX_API_KEY Yes Your MiniMax API key
MINIMAX_MODEL No MiniMax-M2.5 MiniMax model to use for review
MINIMAX_SYSTEM_PROMPT No See below Custom system prompt for the AI reviewer
MINIMAX_REVIEWER_NAME No MiniMax Code Review Name shown in the review comment header
EXCLUDE_PATTERNS No *.lock,package-lock.json,yarn.lock,pnpm-lock.yaml Comma-separated file patterns to exclude from review
MAX_DIFF_CHARS No 0 (unlimited) Maximum total characters for the diff sent to the API

The default system prompt is:

You are an expert code reviewer. Review the provided code changes and give clear, actionable feedback.

You can override it to focus on specific concerns, enforce coding standards, or adjust the review tone, e.g.:

You are a security-focused code reviewer. Identify vulnerabilities, unsafe patterns, and authentication issues. Skip style comments.

Configuration

To use this action, you must add your MiniMax API key as a GitHub secret.

1️⃣ Get your MiniMax API key

Generate an API key from your MiniMax dashboard.

2️⃣ Add the API key to your repository

  1. Go to your GitHub repository

  2. Click Settings

  3. Navigate to Secrets and variables → Actions

  4. Click New repository secret and add:

    • Name: MINIMAX_API_KEYValue: your MiniMax API key

Advanced configuration

Instead of using default values for MINIMAX_MODEL, MINIMAX_SYSTEM_PROMPT, and MINIMAX_REVIEWER_NAME, you can override them, and manage them as GitHub Actions variables. This lets you update the model, review prompt, or reviewer name without touching the workflow file.

1️⃣ Add the variables to your repository

  1. Go to your GitHub repository

  2. Click Settings

  3. Navigate to Secrets and variables → Actions

  4. Click the Variables tab

  5. Click New repository variable and add:

    • Name: MINIMAX_MODELValue: e.g. MiniMax-M2.5
    • Name: MINIMAX_SYSTEM_PROMPTValue: your custom system prompt
    • Name: MINIMAX_REVIEWER_NAMEValue: e.g. AI Code Review

2️⃣ Reference them in your workflow

      - name: Code Review
        uses: tarmojussila/[email protected]
        with:
          MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
          MINIMAX_MODEL: ${{ vars.MINIMAX_MODEL }}
          MINIMAX_SYSTEM_PROMPT: ${{ vars.MINIMAX_SYSTEM_PROMPT }}
          MINIMAX_REVIEWER_NAME: ${{ vars.MINIMAX_REVIEWER_NAME }}

Contributing

Contributions are welcome. See the CONTRIBUTING file for more information.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Releases

Apr 16, 2026

Download .zip

What's Changed

Add security policy in #11 Add exclude patterns and max diff char limit for large PRs in #12

Full Changelog: v0.3.0...v0.4.0

What's Changed

Add adjustable reviewer name, pagination, error handling, and request timeout in #10

Full Changelog: v0.2.0...v0.3.0

Feb 24, 2026

v0.2.0 - Configurable review system prompt

Download .zip

Add configurable review system prompt support: #6

Feb 22, 2026

v0.1.0 - Initial Release

Download .zip

AI-powered GitHub Pull Request code review using MiniMax models. Automatic PR comments, bug detection, and improvement suggestions via GitHub Actions. Features

Detect bugs Suggest improvements AI-dri...