forked from cirolini/genai-code-review
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
43 lines (43 loc) · 1.6 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
41
42
43
# action.yml
name: 'Code Review with ChatGPT'
description: 'Automating code review using ChatGPT with Github Actions integration on PRs for code explanations.'
inputs:
openai_api_key: # id of input
description: 'OpenAI API Key'
required: true
default: ''
github_token: # id of input
description: 'Github API Key'
required: true
default: ''
github_pr_id: # id of input
description: 'Github PR ID'
required: true
default: ''
openai_engine: # id of input
description: 'GPT-3 models can understand and generate natural language. We offer four main models with different levels of power suitable for different tasks. Davinci is the most capable model, and Ada is the fastest.'
required: false
default: 'text-davinci-002'
openai_temperature: # id of input
description: 'What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.'
required: false
default: '0.5'
openai_max_tokens: # id of input
description: 'The maximum number of tokens to generate in the completion.'
required: false
default: '2048'
mode: # id of input
description: 'How to capture PR changes. Options: files, patch'
required: false
default: 'files'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.openai_api_key }}
- ${{ inputs.github_token }}
- ${{ inputs.github_pr_id }}
- ${{ inputs.openai_engine }}
- ${{ inputs.openai_temperature }}
- ${{ inputs.openai_max_tokens }}
- ${{ inputs.mode }}