Skip to content

malywut/gpt_mr_reviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gpt_mr_reviewer

A Gitlab merge request reviewer that uses GPT3 models from openai. This extremely simple script gets the MR diffs from Gitlab API, and generates a comment in the merge request. The default model used is text-davinci-003. The prompt used is "Analyze the following code changes and find issues that need fixing if any. The code changes are in git diff notation, lines starting with - are deleted, lines starting with + are added"

Prerequisites

  • A gitlab API token, set in environment variable GITLAB_ACCESS_TOKEN
  • An OpenAI api key, set in environment variable OPENAI_API_KEY
  • Gitlab informations in environment variables : GITLAB_URL, GITLAB_PROJECT_ID

Usage

python mr_reviewer.py

About

Original blog post with how this repo was created: https://medium.com/@mariealice.blete

About

A Gitlab merge request reviewer that uses GPT3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages