-
Notifications
You must be signed in to change notification settings - Fork 162
/
action.yml
40 lines (35 loc) · 961 Bytes
/
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 the staged files with a GPT model from OpenAI'
author: 'Orion Tools'
inputs:
MODEL:
description: 'The GPT model to use'
required: true
default: 'gpt-4o'
OPENAI_API_KEY:
description: 'OpenAI API Key'
required: true
GITHUB_TOKEN:
description: 'Github token'
required: true
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Code Review GPT
shell: bash
run: npm install code-review-gpt
- name: Run Code Review GPT
shell: bash
run: npx code-review-gpt review --ci=github --model=$MODEL
env:
MODEL: ${{ inputs.MODEL }}
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'