Skip to main content
← Back to workflows

How to Review Code with ChatGPT in GitHub Actions?

anc95/ChatGPT-CodeReview -
GitHub Action
v.v1.0.13
GitHub Org's stars
Contributors
Categories
Usage
name: Code Review GitHub Action
permissions:
contents: read
pull-requests: write
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# Optional
LANGUAGE: Chinese
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: gpt-3.5-turbo
PROMPT:
top_p: 1
temperature: 1
max_tokens: 10000
MAX_PATCH_LENGTH: 10000

ChatGPT-CodeReview logo

ChatGPT-CodeReview

🐥 A code review bot powered by ChatGPT


How to use ChatGPT in GitHub Action for code review?

CodeReview GitHub Action is a code review robot powered by ChatGPT. Essentially, it automates the code review process on GitHub.

Here's how it works:

Automatic Reviews: The moment you create a new Pull Request (PR), the robot kicks in and performs an initial code review. It posts its findings directly in the PR timeline and under file changes.

Continuous Updates: Whenever you push updates to your PR, the robot doesn't just sit back. It automatically re-reviews the updated files to ensure all changes are checked.

This tool is designed to streamline the code review process, making it faster and more efficient. It integrates smoothly into the GitHub workflow, helping to maintain high code quality without slowing down development.