Skip to content

samhoooo/OpenAI-Code-Review-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Code Review Demo

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

Getting started

  1. Add your OpenAI API key to .env in the root directory
OPENAI_API_KEY=<YOUR_API_KEY>
  1. Copy file ./pre-commit to .git/hooks directory.
  2. Add executable permissions to the file using the command:
chmod 777 pre-commit
  1. Try to make a commit. ChatGPT is now reviewing all your staged files!