-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.6 KB
/
opencode-review.yml
File metadata and controls
53 lines (48 loc) · 1.6 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
name: opencode-review
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
review:
if: github.event.pull_request.user.login == 'Jordonbc'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: primary
id: review_primary
continue-on-error: true
uses: anomalyco/opencode/github@2410593023d2c61f05123c9b0faf189a28dfbeee
env:
OPENCODE_API_KEY: ${{ secrets.ZEN_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
model: ${{ vars.OPENCODE_REVIEW_MODEL }}
use_github_token: true
prompt: |
Review this pull request:
- Check for code quality issues
- Look for potential bugs
- Suggest improvements
- name: fallback
if: steps.review_primary.outcome == 'failure'
uses: anomalyco/opencode/github@2410593023d2c61f05123c9b0faf189a28dfbeee
env:
OPENCODE_API_KEY: ${{ secrets.ZEN_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
model: ${{ vars.OPENCODE_REVIEW_MODEL_FALLBACK }}
use_github_token: true
prompt: |
Review this pull request:
- Check for code quality issues
- Look for potential bugs
- Suggest improvements