Skip to content

edelauna/gpt-review

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published