Skip to content

Commit 936a287

Browse files
Merge pull request #67 from afonsoft/devin/1783793057-opencode
* feat: adicionar workflows OpenCode com OmniRoute e remover OpenHands Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com> * fix: pin opencode action, refine trigger, update docs Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
2 parents e6002d4 + 67f2054 commit 936a287

6 files changed

Lines changed: 109 additions & 432 deletions

File tree

.agents/TOOLS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
| `publish-all.yml` | tag release | Publicação NuGet |
2626
| `code-quality.yml` | PR | SonarCloud + Qodana |
2727
| `security-scan.yml` | schedule/PR | Scan de segurança |
28-
| `openhands-resolver.yml` | issue label | Auto-fix via OpenHands |
28+
| `opencode.yml` | issue_comment / pull_request_review_comment | OpenCode com OmniRoute (chat) |
29+
| `opencode-auto-fix.yml` | issue label | OpenCode com OmniRoute (fix-me) |
2930
| `auto-pr-from-main.yml` | push main | Sync automático |
3031

3132
## APIs Externas

.agents/WORKFLOWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ dotnet test QRCoder.Core.sln --configuration Release --collect:"XPlat Code Cover
8383
| Tag de release | `publish-all.yml` |
8484
| Push em `main` | `auto-pr-from-main.yml` |
8585
| Schedule | `security-scan.yml` |
86+
| Comentário `/oc` ou `/opencode` | `opencode.yml` |
87+
| Label `fix-me` em issue/PR | `opencode-auto-fix.yml` |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: OpenCode Auto-Fix
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
pull_request:
7+
types: [labeled]
8+
9+
jobs:
10+
opencode:
11+
if: github.event.label.name == 'fix-me'
12+
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
contents: write
16+
pull-requests: write
17+
issues: write
18+
env:
19+
OMNIROUTE_BASE_URL: https://omniroute.afonsoft.dev/v1
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 1
25+
persist-credentials: false
26+
27+
- name: Run OpenCode
28+
uses: anomalyco/opencode/github@b1fc8113948b518835c2a39ece49553cffe9b30c # v1.17.18
29+
env:
30+
OMNIROUTE_API_KEY: ${{ secrets.OMNIROUTE_API_KEY }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
model: omniroute/auto/claude-sonnet
34+
agent: build
35+
use_github_token: true
36+
prompt: |
37+
Fix the issue or implement the feature described.
38+
Open a pull request with the changes and provide a clear summary.

.github/workflows/opencode.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: OpenCode
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
9+
jobs:
10+
opencode:
11+
if: |
12+
contains(fromJSON('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association) &&
13+
(
14+
github.event.comment.body == '/oc' ||
15+
startsWith(github.event.comment.body, '/oc ') ||
16+
github.event.comment.body == '/opencode' ||
17+
startsWith(github.event.comment.body, '/opencode ')
18+
)
19+
runs-on: ubuntu-latest
20+
permissions:
21+
id-token: write
22+
contents: write
23+
pull-requests: write
24+
issues: write
25+
env:
26+
OMNIROUTE_BASE_URL: https://omniroute.afonsoft.dev/v1
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v6
30+
with:
31+
fetch-depth: 1
32+
persist-credentials: false
33+
34+
- name: Run OpenCode
35+
uses: anomalyco/opencode/github@b1fc8113948b518835c2a39ece49553cffe9b30c # v1.17.18
36+
env:
37+
OMNIROUTE_API_KEY: ${{ secrets.OMNIROUTE_API_KEY }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
model: omniroute/auto/claude-sonnet
41+
agent: build
42+
use_github_token: true

0 commit comments

Comments
 (0)