A simple demo on using OpenAI for code review
https://medium.com/@samho1996/how-do-i-make-use-of-chatgpt-to-review-my-code-33efd8f42178
- Add your OpenAI API key to .env in the root directory
OPENAI_API_KEY=<YOUR_API_KEY>
- Copy file
./pre-commit
to .git/hooks directory. - Add executable permissions to the file using the command:
chmod 777 pre-commit
- Try to make a commit. ChatGPT is now reviewing all your staged files!