GitHub Action for automated code review using GPT
Top 79.1% on sourcepulse
This project provides an automated code review solution for GitHub Pull Requests using OpenAI's GPT models. It's designed for developers and teams seeking to enhance code quality and consistency by leveraging AI for feedback on code changes.
How It Works
The action integrates with GitHub Actions to process pull requests. Upon a pull_request
event (opened or synchronized), it authenticates with OpenAI using a provided API key and GitHub using the GITHUB_TOKEN
. It can operate in two modes: files
(analyzing changed files) or patch
(analyzing diffs). For each relevant code segment, it sends the code to a specified GPT model (defaulting to gpt-3.5-turbo
) with an optional custom prompt, then posts the AI's review as a comment on the pull request.
Quick Start & Requirements
uses: cirolini/genai-code-review@v2
.openai_api_key
GitHub secret)..github/workflows/chatgpt-review.yaml
file.Highlighted Details
gpt-4o
, gpt-4-turbo
, etc.) and parameters like temperature
and max_tokens
.files
and patch
modes for analyzing code changes.custom_prompt
parameter.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The README notes that user data sent to OpenAI may be collected for model training, recommending precautions for sensitive code. It also advises using unique API keys per project for security.
1 year ago
Inactive