-
Notifications
You must be signed in to change notification settings - Fork 100
38 lines (33 loc) · 1.15 KB
/
code-review.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
name: Code Review
permissions:
contents: read
issues: write
pull-requests: write
env: # Or as an environment variable
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
code_review_job:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
name: Automated Code Review
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Automated Code Review
uses: eepMoody/genai-code-review@main
with:
args: '/usr/local/bin/python /app/src/main.py'
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_pr_id: ${{ github.event.number }}
openai_model: 'gpt-4o' # optional
openai_temperature: 0.5 # optional
custom_prompt:
"Check code for errors but not style issues. Check json for formatting errors.
Please limit replies to definite problems.
Avoid style comments or speculative feedback. If
there are no problems, you can reply with 'no comments'."