forked from ljy2855/llm_code_reviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
60 lines (57 loc) · 1.61 KB
/
action.yml
File metadata and controls
60 lines (57 loc) · 1.61 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'LLM Code Review Action'
description: 'Automatically reviews PRs using an external Ollama API'
author: 'ljy2855'
inputs:
github_token:
description: 'The GitHub token'
required: true
github_owner:
description: 'The repository owner'
required: true
github_repository:
description: 'The repository name'
required: true
pr_number:
description: 'The pull request number'
required: true
pr_title:
description: 'The pull request title'
required: true
pr_body:
description: 'The pull request body'
required: true
ollama_api_url:
description: 'The base URL of the Ollama API'
required: true
ollama_model:
description: 'LLM model to generate the review comment'
required: false
default: 'llama3.1:8b'
prompt_type:
description: 'The type of prompt to generate the review comment'
required: false
default: 'GENERAL_REVIEW'
prompt_language:
description: 'The language of the prompt to generate the review comment'
required: false
default: 'EN'
runs:
using: 'docker'
image: 'Dockerfile'
entrypoint: 'python3'
args:
- '/app/src/main.py'
env:
GITHUB_OWNER: ${{ inputs.github_owner }}
GITHUB_REPOSITORY: ${{ inputs.github_repository }}
GITHUB_TOKEN: ${{ inputs.github_token }}
PR_NUMBER: ${{ inputs.pr_number }}
PR_TITLE: ${{ inputs.pr_title }}
PR_BODY: ${{ inputs.pr_body }}
OLLAMA_API_URL: ${{ inputs.ollama_api_url }}
OLLAMA_MODEL: ${{ inputs.ollama_model }}
PROMPT_TYPE: ${{ inputs.prompt_type }}
PROMPT_LANGUAGE: ${{ inputs.prompt_language }}
branding:
icon: 'code'
color: 'blue'