Skip to content

Commit c288f9b

Browse files
feat: adicionar workflows OpenCode com OmniRoute e remover OpenHands
Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
1 parent 62d7a35 commit c288f9b

5 files changed

Lines changed: 102 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
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@latest
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: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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(github.event.comment.body, '/oc') ||
13+
contains(github.event.comment.body, '/opencode')
14+
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
17+
contents: write
18+
pull-requests: write
19+
issues: write
20+
env:
21+
OMNIROUTE_BASE_URL: https://omniroute.afonsoft.dev/v1
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v6
25+
with:
26+
fetch-depth: 1
27+
persist-credentials: false
28+
29+
- name: Run OpenCode
30+
uses: anomalyco/opencode/github@latest
31+
env:
32+
OMNIROUTE_API_KEY: ${{ secrets.OMNIROUTE_API_KEY }}
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
model: omniroute/auto/claude-sonnet
36+
agent: build
37+
use_github_token: true

0 commit comments

Comments
 (0)