Automate code reviews and feedback for GitLab Merge Requests using OpenAI GPT-3/4
Get started with Code Reviewer by following the instructions in the Getting Started section
Introduction · Features · Getting Started · Usage · Author
Code Reviewer is a tool that integrates with GitLab and OpenAI GPT-3/4 to automatically review and provide feedback on Merge Requests. It validates code snippets, suggests improvements, and ensures that best practices are followed.
To get started with Code Reviewer, follow the steps below:
git clone https://github.com/yourusername/code-reviewer.git
cd code-reviewernpm installGITLAB_TOKEN=your_gitlab_token
OPENAI_API_KEY=your_openai_api_keyReplace your_gitlab_token with your GitLab personal access token, and your_openai_api_key with your OpenAI API key.
npm run buildnpm run startIn your GitLab project, create a webhook that triggers on Merge Request events.
Set the webhook URL to the endpoint of your Code Reviewer server (e.g., https://your-code-reviewer-server.com/webhook).
When a Merge Request is created or updated in your GitLab project, Code Reviewer will automatically review the code and provide feedback as comments on the Merge Request.
git checkout -b my-awesome-contribution;git commit -m 'feat: Add some awesome contribution';git push origin my-awesome-contribution.Licensed under the MIT License, Copyright © 2023
See LICENSE for more information.