This GitHub Action enables automatic code reviewing in your repository by sending the git diff patches between a head ref and a base ref to OpenAI's API for annotation using Chat GPT. By leveraging the power of natural language processing, it enhances collaboration and automates the review process similar to static code analysis tools. The annotations provided by Chat GPT serve as non-invasive automated reviews, helping to identify potential issues and improve overall code quality.
- uses: actions/checkout@v4
- name: Chat GPT Code Peer Review
uses: edelauna/gpt-review@v1
with:
# OpenAI API key used for sending patch diffs for review.
# Required
openai_api_key: ''
# The target branch for the git diff to run against.
# Default: ${{ github.base_ref }}
target_branch: ''
# List of comma seperated values for files to ignore as part of the review process.
ignore_files: ''
Goto files
sections of the PR to see annotations, an example of a PR with annotations:
Note
If there are no annotations, you can verify by checking the CI job logs to see if any Notices
have been posted.
For example see logs of annotation here.
The scripts and documentation in this project are released under the MIT License
Github Actions Limits Annotations to 10.