diff --git a/.github/workflows/opencode-review.yml b/.github/workflows/opencode-review.yml new file mode 100644 index 0000000..796bba7 --- /dev/null +++ b/.github/workflows/opencode-review.yml @@ -0,0 +1,27 @@ +name: OpenCode PR Review + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + review: + if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write + steps: + - name: Checkout PR head + uses: actions/checkout@v6 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + + - name: Run OpenCode review + uses: Svtter/opencode-actions/review@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + opencode-go-api-key: ${{ secrets.OPENCODE_GO_API_KEY }} + model: opencode-go/deepseek-v4-flash