Skip to content

birariro/chicken-code-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

chicken-reviewer

When you make a pull request or push, you'll receive a code review from chat-GPT.

Usage

.github/workflows/<workflow-name>.yml file in your GitHub repo and add the following code.

If you want to include a review in your pull request, do the following

name: PR EVENT
on: [pull_request]

jobs:
  reviewer:
    runs-on: ubuntu-latest
    steps:
      - name: reviewer run
        uses: birariro/chicken-code-review@1.0.1
        with:
          github-token: ${{ secrets.GIT_TOKEN }}
          gpt-key: ${{secrets.GPT_KEY}}
          trigger: "PR"
          language: "EN"

If you want to include a review in your push, do the following

name: PUSH EVENT
on: [psuh]

jobs:
  reviewer:
    runs-on: ubuntu-latest
    steps:
      - name: reviewer run
        uses: birariro/chicken-code-review@1.0.1
        with:
          github-token: ${{ secrets.GIT_TOKEN }}
          gpt-key: ${{secrets.GPT_KEY}}
          trigger: "PUSH"
          language: "KR"

input

  • github-token(Required) : Create a personal access token in GitHub and create a GitHub secret.
  • gpt-key(Required) : Generate an OpenAI API key and create a GitHub secret.
  • trigger : Specify what you want to review (default = pull request)
  • language : Specify the language for the answer (default = EN)

github personal access token
github secret
open AI key

Why chicken?

The phrase chicken instead of pheasant is a Korean proverb that says
which refers to substituting something that is similar to something else when there is nothing suitable.

In other words, if you don't have someone to review your code
chat-GPT to review your code.