-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 2.08 KB
/
opencode.yml
File metadata and controls
51 lines (46 loc) · 2.08 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
name: opencode
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
opencode:
if: |
contains(github.event.comment.body, ' /oc') ||
startsWith(github.event.comment.body, '/opencode') ||
contains(github.event.comment.body, '/opencode') ||
startsWith(github.event.comment.body, '/opencode') ||
github.event_name == 'issue_comment' ||
github.event_name == 'pull_request_review_comment' ||
github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
with:
model: minimax-coding-plan/MiniMax-M2.1
prompt: |
1. If PR tags or references any issues (e.g., "Fixes #123"), verify if the implementation fully satisfies the requirements of those issues. If no issues are tagged, proceed without mentioning it.
2. If there are previous code reviews on this PR, verify if the feedback has been addressed. If there are no previous reviews, do not mention their absence.
3. Analyze for code quality issues, potential bugs, and architectural improvements.
4. Enforce SOLID principles. Provide a table breakdown scoring the PR on each of the 5 SOLID points (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion). For each point, provide a score (e.g., 0-10 or N/A) and specific, actionable suggestions on where and how to improve.