Skip to content

Commit bb76791

Browse files
committed
ci: add OpenCodeReview PR review workflow
1 parent 29a540a commit bb76791

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/code-review.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: AI Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
concurrency:
12+
group: ocr-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
review:
17+
# Fork PRs cannot read secrets; skip them cleanly.
18+
if: github.event.pull_request.head.repo.fork == false
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 40
21+
steps:
22+
- uses: alibaba/open-code-review@494bf1c8d7a19196ab166960a06fef38d69a1d16 # v1.12.0
23+
with:
24+
llm_url: https://api.z.ai/api/coding/paas/v4
25+
llm_auth_token: ${{ secrets.OCR_LLM_TOKEN }}
26+
llm_model: glm-5.3-flash
27+
llm_use_anthropic: false
28+
# GLM-5.3 family rejects thinking.type=disabled, which is the
29+
# action's default extra_body — this override is required.
30+
llm_extra_body: '{"thinking": {"type": "enabled"}}'
31+
llm_reasoning_effort: low
32+
incremental: 'true'
33+
route_severity_below: 'low'
34+
max_tokens_budget: '500000'
35+
review_task_timeout: '15'
36+
stream_progress: 'true'

0 commit comments

Comments
 (0)