ci: add automated opencode PR review workflow

Adds safe PR review automation for pull requests and /oc-review comments
Supports fork PR review without checking out or executing untrusted code
Defines a dedicated read-only PR review agent
This commit is contained in:
Bohdan Triapitsyn
2026-06-04 03:50:05 +03:00
parent 6466708078
commit 5d7b5c89f2
4 changed files with 271 additions and 4 deletions
+4 -2
View File
@@ -9,10 +9,12 @@ on:
jobs:
opencode:
if: |
contains(github.event.comment.body, ' /oc') ||
!startsWith(github.event.comment.body, '/oc-review') &&
!contains(github.event.comment.body, ' /oc-review') &&
(contains(github.event.comment.body, ' /oc') ||
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
startsWith(github.event.comment.body, '/opencode'))
runs-on: ubuntu-latest
permissions:
id-token: write