Skip to content

Quick AI Code Review

Actions
Save your time from code review, let AI do it! You can also exclude unnecessary files
v0.4
Latest
Star (21)

AI Code Review

AI Code Review Banner

Let AI do code review for you! Demo

This app is calling OpenAI chatGPT API to do code review for you.

GitHub Action | Self-host Instruction

Install

  1. Go to Settings -> Secrets and variables -> Actions -> New repository secret

  2. Create a repository secret named OPENAI_API_KEY (or AZURE_OPENAI_API_KEY if you're using Azure) and fill it with your API key

  3. Add the configurations to .github/workflows/pr-code-review.yml

    1. OpenAI example

    2. Azure OpenAI example

  4. Get more details about the available environment variables in .env.action.example

  5. Create a pull request in your repository and let AI assistant you!

Host it by yourself

You can also host the code reviewer by your self. Just follow the Dev section.

Dev

The application is built on Probot.

Setup

# Install dependencies
npm install

# add environment variables
cp .env.example .env

# build app
npm run build

# Run the bot
npm start

Learn more about Probot configuration.

Build

# build node.js app
npm run build

# build GitHub Action
npm run build:action

# build deployable azure function
npm run build:function

Docker

You can also build docker image to deploy.

# 1. Build container
docker build -t protagonist-bot .

# 2. Start container
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> protagonist-bot

License

GPL 3.0 © 2023 Louis Liu

Quick AI Code Review is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Save your time from code review, let AI do it! You can also exclude unnecessary files
v0.4
Latest

Quick AI Code Review is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.