-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 2.41 KB
/
opencode-triage.yml
File metadata and controls
58 lines (52 loc) · 2.41 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
name: Issue Triage
on:
issues:
types: [opened]
jobs:
triage:
runs-on: blacksmith-2vcpu-ubuntu-2404
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Check account age
id: check
uses: actions/github-script@v7
with:
script: |
const user = await github.rest.users.getByUsername({
username: context.payload.issue.user.login
});
const created = new Date(user.data.created_at);
const days = (Date.now() - created) / (1000 * 60 * 60 * 24);
return days >= 30;
result-encoding: string
- uses: actions/checkout@v4
if: steps.check.outputs.result == 'true'
- name: Configure git
if: steps.check.outputs.result == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- uses: anomalyco/opencode/github@latest
if: steps.check.outputs.result == 'true'
env:
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
with:
model: minimax-coding-plan/MiniMax-M2.1
prompt: |
Analyze this issue. You have access to the codebase context.
**CRITICAL: Your only allowed action is to post a COMMENT on the issue. DO NOT create branches, pull requests, or attempt to modify the codebase.**
1. **Classify**: Determine if this is a Bug, Feature Request, or Question.
2. **Validate & Request Info**:
- **Missing Data**: If critical information is needed to understand or reproduce the issue (e.g., reproduction steps, crash logs, version numbers, screenshots), explicitly ask the user to provide it.
3. **Analyze**:
- If a stack trace or error is provided, analyze the codebase to find the root cause and provide code pointers.
- If it's a feature request, briefly summarize the architectural impact.
4. **Action**:
- Your response MUST be a comment on the issue.
- If you can provide a potential fix or documentation link, describe it in the comment but do NOT implement it.
- If you need more info, specify exactly what is missing.
- If the issue is vague, spam, or you have nothing valuable to add: **DO NOT COMMENT**.