-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy pathaction.yml
40 lines (38 loc) · 1.08 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 'Code Review GPT'
description: 'Reviews PR changes with a GPT model from OpenAI'
author: 'Orion Tools'
inputs:
MODEL:
description: 'Model name to use for review'
required: true
default: 'gpt-4o'
REVIEW_LANGUAGE:
description: 'Target natural language for translation'
required: false
default: 'English'
OPENAI_API_KEY:
description: 'OpenAI API Key'
required: true
GITHUB_TOKEN:
description: 'Github token'
required: true
runs:
using: 'composite'
steps:
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install and Run Code Review GPT
shell: bash
run: |
bun add code-review-gpt@latest
bun code-review-gpt review --ci=github --model=$MODEL --reviewLanguage=$REVIEW_LANGUAGE
env:
MODEL: ${{ inputs.MODEL }}
REVIEW_LANGUAGE: ${{ inputs.REVIEW_LANGUAGE }}
OPENAI_API_KEY: ${{ inputs.OPENAI_API_KEY }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
branding:
icon: 'code'
color: 'blue'