fix(ci): use opencode-go plan model for AI review #5

Merged
Noel merged 14 commits from fix/ai_pr_review into main 2026-10-18 16:24:58 +00:00
Showing only changes of commit f8d128705f - Show all commits
+13 -4
View File
@@ -252,10 +252,19 @@ jobs:
"opencode-go": {
"options": { "apiKey": "%s" }
}
},
"permission": {
"edit": "deny",
"bash": "deny",
"webfetch": "deny"
}
}' "$OPENCODE_API_KEY" > opencode.json
# --print-logs: surface auth/provider errors in the CI log instead
# of failing with an opaque exit code
# Read-only agent: denying edit/bash/webfetch means no headless
# permission prompts can hang or kill the run, and the reviewer
# physically cannot modify the repo.
EXIT_CODE=0
opencode run \
--print-logs \
--model opencode-go/deepseek-v4-pro#max \
@@ -325,12 +334,12 @@ jobs:
End your response with a final verdict line, exactly one of:
VERDICT: APPROVE (no BLOCKER findings)
VERDICT: REQUEST_CHANGES (at least one BLOCKER)" \
> /tmp/review.md 2>&1
EXIT_CODE=$?
> /tmp/review.md 2>&1 || EXIT_CODE=$?
# always show the output - never swallow the error text
cat /tmp/review.md
if [ $EXIT_CODE -ne 0 ]; then
if [ "$EXIT_CODE" -ne 0 ]; then
echo "::error::opencode review failed (exit ${EXIT_CODE}) - NOT posting this output as a review comment"
exit $EXIT_CODE
exit "$EXIT_CODE"
fi
- name: Post review as PR comment