Repolode
truongnh1992

truongnh1992/gemini-ai-code-reviewer

A GitHub Action that posts AI-generated code review comments on pull requests, triggered by a /gemini-review comment, using Google's Gemini API.

Stars
258
Forks
57
Open issues
13
Last commit
22 days ago

What is it?

Gemini AI Code Reviewer is a GitHub Action that reviews pull requests with Google's Gemini models. It collects the code changes in a pull request, filters out files you choose to skip, sends the modified code in chunks to Gemini, and adds the resulting review comments directly to the PR.

The action is set up in a workflow file in your repository and needs a Gemini API key stored as a GitHub Secret. The review runs when someone comments /gemini-review on a pull request. You can choose the Gemini model with the GEMINI_MODEL input and exclude file patterns such as *.md or lock files with the EXCLUDE input.

The project is MIT licensed and is written in Python.

Key features

  • 01Triggers a review when /gemini-review is commented on a pull request
  • 02Sends PR code changes to the Gemini API in chunks
  • 03Lets you exclude file patterns from review
  • 04Lets you choose the Gemini model through a workflow input
  • 05Posts review comments directly on the pull request

Use cases

  • Getting a first automated review pass on pull requests before human reviewers look at them
  • Adding AI-assisted feedback to projects that want Gemini instead of other review tools
  • Skipping docs, lock files and config files in code review by listing them in EXCLUDE

Quick start

  1. 1

    Get a Gemini API key from Google AI Studio

  2. 2

    Add the key as a GitHub Secret named GEMINI_API_KEY in your repository

  3. 3

    Create .github/workflows/code-review.yml with the workflow from the README

  4. 4

    Comment /gemini-review on a pull request to trigger a review

Things to know

  • Requires a Gemini API key, which may incur usage costs.
  • The README's example uses a model name (gemini-3.8-flash) that may not exist, so the model setting may need checking.

In collections

Topics

FAQ

What is gemini-ai-code-reviewer?
A GitHub Action that posts AI-generated code review comments on pull requests, triggered by a /gemini-review comment, using Google's Gemini API. Gemini AI Code Reviewer is a GitHub Action that reviews pull requests with Google's Gemini models. It collects the code changes in a pull request, filters out files you choose to skip, sends the modified code in chunks to Gemini, and adds the resulting review comments directly to the PR.
Is gemini-ai-code-reviewer free to use? What license does it have?
gemini-ai-code-reviewer is open source under the MIT license. Check the license terms before using it in commercial products.
Is gemini-ai-code-reviewer still maintained?
Actively maintained. The last commit to gemini-ai-code-reviewer was on Oct 16, 2026.
What can I use gemini-ai-code-reviewer for?
Getting a first automated review pass on pull requests before human reviewers look at them Adding AI-assisted feedback to projects that want Gemini instead of other review tools Skipping docs, lock files and config files in code review by listing them in EXCLUDE
How do I install gemini-ai-code-reviewer?
Get a Gemini API key from Google AI Studio Add the key as a GitHub Secret named GEMINI_API_KEY in your repository Create .github/workflows/code-review.yml with the workflow from the README Comment /gemini-review on a pull request to trigger a review
Where can I get gemini-ai-code-reviewer?
The source code and installation instructions are on GitHub: https://github.com/truongnh1992/gemini-ai-code-reviewer

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects