Skip to content

Commit

Permalink
CI(dev): GPT Code Review
Browse files Browse the repository at this point in the history
  • Loading branch information
Leegiyeon committed May 8, 2024
1 parent 7455616 commit 6053826
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/gpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: ela-prac-service

permissions:
contents: read
pull-requests: write

on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash

- name: Build with Gradle
run: ./gradlew clean build
shell: bash

- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

- name: Show Current Time
run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}"
shell: bash

- name: ChatGPT codeReviewer
uses: anc95/ChatGPT-CodeReview@v1.0.13
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

# Optional
LANGUAGE: Korean
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models
PROMPT: Please check if there are any confusions or irregularities in the following code diff
top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p
temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature
max_tokens: 10000
MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length.

0 comments on commit 6053826

Please sign in to comment.