From 87a65c5e83e0645af33aa7afb12955063cfdf567 Mon Sep 17 00:00:00 2001 From: Enrico Rubboli Date: Mon, 14 Sep 2026 09:33:20 +0400 Subject: [PATCH 1/2] ci: add OpenCodeReview PR review workflow (GLM-5.3-flash via z.ai coding plan) --- .github/workflows/code-review.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/code-review.yml diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml new file mode 100644 index 0000000..5c90cab --- /dev/null +++ b/.github/workflows/code-review.yml @@ -0,0 +1,36 @@ +name: AI Code Review + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +concurrency: + group: ocr-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + review: + # Fork PRs cannot read secrets; skip them cleanly. + if: github.event.pull_request.head.repo.fork == false + runs-on: ubuntu-latest + timeout-minutes: 40 + steps: + - uses: alibaba/open-code-review@v1.12.0 + with: + llm_url: https://api.z.ai/api/coding/paas/v4 + llm_auth_token: ${{ secrets.OCR_LLM_TOKEN }} + llm_model: glm-5.3-flash + llm_use_anthropic: false + # GLM-5.3 family rejects thinking.type=disabled, which is the + # action's default extra_body — this override is required. + llm_extra_body: '{"thinking": {"type": "enabled"}}' + llm_reasoning_effort: low + incremental: 'true' + route_severity_below: 'low' + max_tokens_budget: '500000' + review_task_timeout: '15' + stream_progress: 'true' From aca0c812ad252e2a8a4c0232f372cbffacba793f Mon Sep 17 00:00:00 2001 From: Enrico Rubboli Date: Mon, 14 Sep 2026 09:45:19 +0400 Subject: [PATCH 2/2] ci: pin OpenCodeReview action to v1.12.0 commit SHA --- .github/workflows/code-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 5c90cab..b2802e3 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 40 steps: - - uses: alibaba/open-code-review@v1.12.0 + - uses: alibaba/open-code-review@494bf1c8d7a19196ab166960a06fef38d69a1d16 # v1.12.0 with: llm_url: https://api.z.ai/api/coding/paas/v4 llm_auth_token: ${{ secrets.OCR_LLM_TOKEN }}