-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
74 lines (70 loc) · 2.09 KB
/
action.yml
File metadata and controls
74 lines (70 loc) · 2.09 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "PRMate Review"
description: "PRMate's automated review for a Pull Request"
author: "Rooam Lee"
branding:
color: "purple"
icon: "check"
inputs:
pr-number:
description: >
The number of the Pull Request to review.
This is required to specify which PR PRMate should analyze.
required: true
repository:
description: >
The full name of the repository containing the Pull Request,
including the owner. For example, 'owner/repository-name'.
required: true
default: ${{ github.repository }}
token:
description: >
GitHub token for API authentication.
Needs write access to issues and pull requests
in order to post review comments.
required: true
default: ${{ github.token }}
openai-api-key:
description: >
Optional OpenAI API key (required if not using Ollama).
required: false
default: ""
ollama-host:
description: >
Optional Ollama host URL (used if running a local Ollama server).
required: false
default: "http://127.0.0.1:11434"
review-language:
description: >
Language of the code review output ('Korean' or 'English').
required: false
default: "Korean"
review-strict:
description: >
Whether to use strict review formatting ("True" to enable strict mode).
required: false
default: "False"
runs:
using: "composite"
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install uv and Sync dependencies
shell: bash
run: |
cd ${{ github.action_path }}
python -m pip install --upgrade pip
pip install uv
uv sync
- name: Run PRMate review
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
OPENAI_API_KEY: ${{ inputs.openai-api-key }}
OLLAMA_HOST: ${{ inputs.ollama-host }}
REVIEW_LANG: ${{ inputs.review-language }}
REVIEW_STRICT: ${{ inputs.review-strict }}
run: |
cd ${{ github.action_path }}
uv run python -m app.main ${{ inputs.pr-number }} ${{ inputs.repository }}