Skip to content
play

GitHub Action

Chat GPT Code Peer Review

v1.2.1 Latest version

Chat GPT Code Peer Review

play

Chat GPT Code Peer Review

This action performs a code peer review using OpenAI ChatGPT API and functions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Chat GPT Code Peer Review

uses: edelauna/gpt-review@v1.2.1

Learn more about this action in edelauna/gpt-review

Choose a version

Build and Test

Chat GPT Code Peer Review v1

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.

Usage

- 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:

Screenshot 2023-09-10 105540

Screenshot 2023-09-10 105616

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.

License

The scripts and documentation in this project are released under the MIT License

Limitations

Github Actions Limits Annotations to 10.

Dependencies