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
🐥 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 using ChatGPT. In other words, automation of code reviews on GitHub.
How it works:
- Automated Reviews: The moment one creates a new Pull Request, the robot kicks in and performs preliminary code review; it posts its findings directly in the PR timeline and under file changes.
- Continuous Updates: The bot at no time is idle when you push updates to your PR. It automatically re-reviews the updated files so that all changes are reviewed.
- 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
This will definitely help in hastening code reviews; the process will be a lot speedier and smoother. Integrates perfectly into the GitHub workflow and really helps keep high code quality without slowing down development.
Monitoring GitHub Actions Workflows
CICube is a GitHub Actions monitoring tool that provides you with detailed insights into your workflows to further optimize your CI/CD pipeline. With CICube, you will be able to track your workflow runs, understand where the bottlenecks are, and tease out the best from your build times. Go to cicube.io now and create a free account to better optimize your GitHub Actions workflows!