Skip to content

keploy/code-review-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeployAI Code Review Action

GitHub Marketplace

An intelligent GitHub Action that provides automated, AI-powered code reviews on your pull requests. It features a resilient fallback system, visual summaries, and smart diff analysis to deliver professional-grade feedback.

Key Features

  • 📊 Visual PR Summary: Each review starts with a Mermaid sequence diagram summarizing the changes.
  • 🧠 Intelligent Diff Analysis: Automatically prioritizes critical files in large pull requests to stay within token limits.
  • 🔄 Resilient Fallback System: If the primary GitHub Models API fails, it seamlessly switches to a self-hosted Ollama model.
  • 🤖 Multi-Provider Support: Natively supports GitHub Models and any model compatible with Ollama.
  • Comprehensive Reviews: Analyzes code for security, performance, best practices, and style.
  • 🚀 Zero-Setup Ready: Works out of the box with the standard GITHUB_TOKEN.

Usage

Workflow Permissions

This action requires the following permissions in your workflow file to read code and post comments.

permissions:
  contents: read
  pull-requests: write

Basic Example

This configuration uses the default settings and is the quickest way to get started. Create a file like .github/workflows/code-review.yml:

name: KeployAI Code Review

on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  contents: read
  pull-requests: write

jobs:
  ai-review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0 # Required to get the full git history for diffing

      - name: Run Smart AI Code Review
        uses: keploy/code-review-agent@v1
        with:
          github-token: ${{ secrets.GH_TOKEN }}

Advanced Example

This configuration customizes the models, temperature, and file patterns.

name: Advanced KeployAI Code Review

on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  contents: read
  pull-requests: write

jobs:
  ai-review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Run Smart AI Code Review
        uses: keploy/code-review-agent@v1
        with:
          github-token: ${{ secrets.GH_TOKEN }}
          model: 'gpt-4o'
          ollama-model: 'gemma3n:e4b'
          temperature: 0.1
          ignore-patterns: '*.md,*.lock,dist/**'

Inputs

See the action.yml file for a full list of inputs and their descriptions.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors