Code Review GPT uses Large Language Models to review code in your CI/CD pipeline. It helps streamline the code review process by providing feedback on code that may have issues or areas for improvement.
It should pick up on common issues such as:
- Exposed secrets
- Slow or inefficient code
- Unreadable code
It can also be run locally in your command line to review staged files.
Code Review GPT is in alpha and should be used for fun only. It may provide useful feedback but please check any suggestions thoroughly.
code-review-gpt-3.mp4
See the package documentation for more information.
See the action documentation for more information.
-
Clone the repository:
git clone https://github.com/mattzcarey/code-review-gpt.git cd code-review-gpt && cd packages/code-review-gpt
-
Install dependencies:
npm install
-
Set up the API key:
- Rename the .env.example file to .env.
- Open the .env file and replace YOUR_API_KEY with your actual OPENAI API key.
When used globally you should run export OPENAI_API_KEY=YOUR_API_KEY
(or similar for your operating system) in your terminal to set the API key.
-
Run the application:
npm start
See the package.json file for all the npm commands you can run.
- Make a PR π
We use release-please on this project. If you want to create a new release from your PR, please make sure your PR title follows the Conventional Commits format. The release-please bot will automatically create a new release for you when your PR is merged.
- fix: which represents bug fixes, and correlates to a patch version.
- feat: which represents a new feature, and correlates to a SemVer minor.
- feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a major version.
Thanks to our wonderful contributors!
The roadmap shifts the focus to a Github app which can be installed on any repo. This will allow for a more seamless UX and better features including a chatbot to discuss the PR and make suggestions.
The code-review-gpt package will continue to be maintained and improved based on the feedback from the Github app.
![quivr logo](https://private-user-images.githubusercontent.com/77928207/253061129-30361248-3159-4535-8efb-b114989ae886.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMjM3MTgsIm5iZiI6MTcyNTAyMzQxOCwicGF0aCI6Ii83NzkyODIwNy8yNTMwNjExMjktMzAzNjEyNDgtMzE1OS00NTM1LThlZmItYjExNDk4OWFlODg2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDEzMTAxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhMzQzOWIzMTVkZTBiZTZhNDA1ZTg5MDQyMzhjZjY1OGNiYWY2ZjQxNDU5MmE0OWM0YThkNjAzY2MwNWE2OGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GlxNxjtcJw0YohEt6s2_HJTzigaycWOI9Wl7-l30Dg4)
![aleios logo](https://private-user-images.githubusercontent.com/77928207/253060489-a47c2460-b866-433f-a4c9-efb5737d4fed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMjM3MTgsIm5iZiI6MTcyNTAyMzQxOCwicGF0aCI6Ii83NzkyODIwNy8yNTMwNjA0ODktYTQ3YzI0NjAtYjg2Ni00MzNmLWE0YzktZWZiNTczN2Q0ZmVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDEzMTAxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4ZGYxOTNlZGZjYzA1MTIzMWQxMDI0OTQzNzBkMWNiYjllZGRjMjA3ZWVlZDBkMDg3YzA0NDhkOTkwNmViMTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cvZzymcNIotEyD8OLUt46Kvf5nGFJsh06QIf3Qfk-_8)