Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/louis-7/ai-code-review
Let AI do code review.
https://github.com/louis-7/ai-code-review
ai bot chatgpt code code-review codereview codereview-bot
Last synced: 21 days ago
JSON representation
Let AI do code review.
- Host: GitHub
- URL: https://github.com/louis-7/ai-code-review
- Owner: Louis-7
- License: gpl-3.0
- Created: 2023-04-14T07:28:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-13T01:02:40.000Z (about 2 months ago)
- Last Synced: 2024-10-14T09:41:16.381Z (22 days ago)
- Topics: ai, bot, chatgpt, code, code-review, codereview, codereview-bot
- Language: JavaScript
- Homepage:
- Size: 2.03 MB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# AI Code Review
[![Function Deploy](https://github.com/Louis-7/ai-code-review/actions/workflows/main_ai-code-review-gh-app.yml/badge.svg)](https://github.com/Louis-7/ai-code-review/actions/workflows/main_ai-code-review-gh-app.yml)
Let AI do code review for you! [Demo](https://github.com/Louis-7/ranking-board/pull/10)
This app is calling OpenAI chatGPT API to do code review for you.
[GitHub App](https://github.com/apps/ai-code-review) | [GitHub Action](https://github.com/marketplace/actions/quick-ai-code-review) | [Self-host Instruction](https://github.com/Louis-7/ai-code-review/tree/main#host-it-by-yourself)
## Install
1. Go to **Settings** -> **Secrets and variables** -> **Actions** -> **New repository secret**
2. Create a repository secret named `OPENAI_API_KEY` and fill it with your API key
3. Add the configurations to `.github/workflows/pr-code-review.yml`
1. [OpenAI example](https://github.com/Louis-7/ai-code-review/blob/main/examples/open-ai-example.yml)
2. [Azure OpenAI example](https://github.com/Louis-7/ai-code-review/blob/main/examples/azure-open-ai-example.yml)
4. Get more details about the available environment variables in [.env.action.example](https://github.com/Louis-7/ai-code-review/blob/main/.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](https://github.com/probot/probot).
### Setup
```sh
# 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](https://probot.github.io/docs/configuration/).
### Build
```sh
# 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.
```sh
# 1. Build container
docker build -t protagonist-bot .# 2. Start container
docker run -e APP_ID= -e PRIVATE_KEY= protagonist-bot
```## License
[GPL 3.0](LICENSE) © 2023 Louis Liu