AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …)

Hey dev.to community!

I’m excited to announce that I’ve open-sourced AI-Powered Code Review Action – a GitHub Action that leverages state-of-the-art AI models like Gemini and OpenAI GPT-4 to automate your pull request code reviews.

Key Featu…


This content originally appeared on DEV Community and was authored by quanlegia

Hey dev.to community!

I'm excited to announce that I've open-sourced AI-Powered Code Review Action – a GitHub Action that leverages state-of-the-art AI models like Gemini and OpenAI GPT-4 to automate your pull request code reviews.

Key Features

  • 🔌 Pluggable Architecture: Easily add new/experimental AI providers.
  • 🎯 Smart Filtering: Select files for review using flexible include/exclude glob patterns.
  • 📦 Chunking Support: Handles large diffs by splitting them into chunks.
  • 🎨 Customizable Rules: Add your own review rules and priorities.
  • 💰 Cost Tracking: Monitor token usage and estimated API costs.
  • 🔒 Secure: API keys are never logged; only diffs are sent to AI providers.
  • 📊 Detailed Reports: In-depth review statistics and reporting.

Current Provider Support

Provider Status Model Notes
Gemini ✅ Ready gemini-1.5-flash Fast, latest from Google
OpenAI ✅ Ready gpt-4-turbo-preview High quality, higher cost
HuggingFace 🚧 Soon Various Open source models planned

Quick Start

Create a new workflow at .github/workflows/ai-code-review.yml:

name: AI-Powered Code Review
on:
  pull_request:
    types: [opened, synchronize]
permissions:
  issues: write
  pull-requests: write
  contents: read
jobs:
  ai-review:
    runs-on: ubuntu-latest
    steps:
      - name: AI-Powered Code Review
        uses: legiaquan/code-review-action@v1.0.1
        with:
          provider: 'gemini'
          api_key: ${{ secrets.GEMINI_API_KEY }}
          pr_number: ${{ github.event.pull_request.number }}

Easily configurable for more advanced usage!

How to Contribute 🚀

This is an early-stage project and all contributions are very welcome!

You can help by:

  • Adding support for new AI models/providers (open source or SaaS)
  • Improving tests and CI/CD
  • Suggesting or refining review rules
  • Fixing bugs, enhancing performance
  • Improving documentation, examples, and usability

👉 See the CONTRIBUTING.md for more details

👉 The code is written in TypeScript.

Example

👉 See the live example review by the bot on a demo PR: #21

Final thoughts

If you’re interested in AI-powered dev tools and automation, please star the repository, try integrating it with your projects, and especially send your pull requests and suggestions.

Thank you for reading and happy contributing!

AI-Powered Code Review Action


This content originally appeared on DEV Community and was authored by quanlegia


Print Share Comment Cite Upload Translate Updates
APA

quanlegia | Sciencx (2025-08-26T05:06:24+00:00) AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …). Retrieved from https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/

MLA
" » AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …)." quanlegia | Sciencx - Tuesday August 26, 2025, https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/
HARVARD
quanlegia | Sciencx Tuesday August 26, 2025 » AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …)., viewed ,<https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/>
VANCOUVER
quanlegia | Sciencx - » AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/
CHICAGO
" » AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …)." quanlegia | Sciencx - Accessed . https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/
IEEE
" » AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …)." quanlegia | Sciencx [Online]. Available: https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/. [Accessed: ]
rf:citation
» AI-Powered Code Review Action – Automated PR Reviews Using AI (OpenAI, Gemini, …) | quanlegia | Sciencx | https://www.scien.cx/2025/08/26/ai-powered-code-review-action-automated-pr-reviews-using-ai-openai-gemini/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.