-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (62 loc) · 2.43 KB
/
Copy pathopencode-issue-implement.yml
File metadata and controls
77 lines (62 loc) · 2.43 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
75
76
77
# .github/workflows/opencode-issue-implement.yml
name: OpenCode Issue Implement
on:
issues:
types: [labeled]
permissions:
id-token: write
contents: write
issues: write
pull-requests: write
concurrency:
group: opencode-implement-${{ github.event.issue.number }}
cancel-in-progress: false
jobs:
implement:
if: github.event.label.name == 'opencode:implement'
runs-on: ubuntu-latest
env:
GIT_AUTHOR_NAME: opencode[bot]
GIT_AUTHOR_EMAIL: opencode[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: opencode[bot]
GIT_COMMITTER_EMAIL: opencode[bot]@users.noreply.github.com
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Configure Git author
run: |
git config --global user.name "opencode[bot]"
git config --global user.email "opencode[bot]@users.noreply.github.com"
git config user.name "opencode[bot]"
git config user.email "opencode[bot]@users.noreply.github.com"
- name: Implement issue from latest OpenCode Plan comment
uses: anomalyco/opencode/github@latest
env:
GITHUB_TOKEN: ${{ secrets.OPENCODE_GITHUB_TOKEN }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
use_github_token: true
agent: issue-implementer
model: opencode/big-pickle
prompt: |
Implement issue #${{ github.event.issue.number }}.
Before editing files:
1. Read the issue and comments.
2. Find the latest issue comment containing:
<!-- opencode-plan:start -->
3. Extract the plan between:
<!-- opencode-plan:start -->
<!-- opencode-plan:end -->
4. If no plan exists, do not modify files.
5. If the plan says "Ready for implementation: No", do not modify files.
6. If ready, implement the smallest correct change, add or update tests, and run relevant checks.
Do not create a branch.
Do not switch branches.
Do not push.
Do not manually create a pull request.
The OpenCode GitHub Action has already checked out the correct working branch.
Leave the intended changes in the working tree.
The action will handle publishing the branch and PR.
Final merge must be manual by a maintainer.