Giter VIP home page Giter VIP logo

chatgpt-reviewer's Introduction

ChatGPT-Reviewer

Automated pull requests reviewing and issues triaging with ChatGPT.

How to use

Create an OpenAI API key here, and then set the key as an action secret in your repository named OPENAI_API_KEY.

Finally, create a file named .github/workflows/chatgpt-review.yml with the following contents:

name: ChatGPT Review

on: [pull_request]

jobs:
    chatgpt-review:
        name: ChatGPT Review
        runs-on: ubuntu-latest
        steps:
            - uses: uniacco-tech/ChatGPT-Reviewer@v0
              name: ChatGPT Review
              env:
                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
                  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
                  # OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
              # Optional configurations:
              # with:
              #   model: "gpt-3.5-turbo"
              #   temperature: 0.2
              #   review_per_file: true
              #   comment_per_file: true

Configurations

Parameter Description Required Default
GITHUB_TOKEN Github token used to send out review comments true ""
OPENAI_API_KEY API key used to invoke OpenAI true ""
OPENAI_API_BASE API based used to access Azure OpenAI false ""
blocking Blocking the pull requests on OpenAI failures false False
model OpenAI model name false gpt-3.5-turbo
temperature Temperature for the model false 0.2
frequency_penalty Frequency penalty for the model false 0
presence_penalty Presence penalty for the model false 0
review_per_file Send out review requests per file false Large changes would be reviewed per file automatically
comment_per_file Post review comments per file false True

Samples

The ChatGPT reviewer PRs are also getting reviewed by ChatGPT, refer the pull requests for the sample review comments.

Special notes for public repository forks

In order to protect public repositories for malicious users, Github runs all pull request workflows raised from repository forks with a read-only token and no access to secrets.

pull_request_target event could be used in such cases, which would run the workflow in the context of the base of the pull request (rather than in the context of the merge commit, as the pull_request event does).

Refer Github docs here for more details of pull_request_target event.

chatgpt-reviewer's People

Contributors

feiskyer avatar dmdhrumilmistry avatar

Stargazers

JK avatar

Watchers

 avatar

Forkers

uniacco-tech

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.