Skip to content

Commit 67f2054

Browse files
fix: pin opencode action, refine trigger, update docs
Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
1 parent c288f9b commit 67f2054

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

.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` |

.github/workflows/opencode-auto-fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
persist-credentials: false
2626

2727
- name: Run OpenCode
28-
uses: anomalyco/opencode/github@latest
28+
uses: anomalyco/opencode/github@b1fc8113948b518835c2a39ece49553cffe9b30c # v1.17.18
2929
env:
3030
OMNIROUTE_API_KEY: ${{ secrets.OMNIROUTE_API_KEY }}
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/opencode.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
jobs:
1010
opencode:
1111
if: |
12-
contains(github.event.comment.body, '/oc') ||
13-
contains(github.event.comment.body, '/opencode')
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+
)
1419
runs-on: ubuntu-latest
1520
permissions:
1621
id-token: write
@@ -27,7 +32,7 @@ jobs:
2732
persist-credentials: false
2833

2934
- name: Run OpenCode
30-
uses: anomalyco/opencode/github@latest
35+
uses: anomalyco/opencode/github@b1fc8113948b518835c2a39ece49553cffe9b30c # v1.17.18
3136
env:
3237
OMNIROUTE_API_KEY: ${{ secrets.OMNIROUTE_API_KEY }}
3338
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)