mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 18:18:43 +00:00
refactor(ci): make ai-review model/endpoint configurable via repository variables
- replace hardcoded GLM endpoint with vars.AI_REVIEW_BASE_URL - replace hardcoded model with vars.AI_REVIEW_MODEL - use secrets.AI_REVIEW_API_KEY for auth token - add configuration reference in header comment
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
# AI Code Review Workflow
|
# AI Code Review Workflow
|
||||||
# Uses anthropics/claude-code-action with GLM routing via GitHub App tokens.
|
# Uses anthropics/claude-code-action with configurable model/endpoint via repository variables.
|
||||||
# Same-repo PRs stay on the self-hosted cliproxy runner; external PRs use ubuntu-latest.
|
# Same-repo PRs stay on the self-hosted cliproxy runner; external PRs use ubuntu-latest.
|
||||||
#
|
#
|
||||||
|
# Configuration (GitHub Settings → Secrets and variables → Actions):
|
||||||
|
# Variables: AI_REVIEW_BASE_URL, AI_REVIEW_MODEL
|
||||||
|
# Secrets: AI_REVIEW_API_KEY
|
||||||
|
#
|
||||||
# Triggers:
|
# Triggers:
|
||||||
# - Automatically when PR is opened, receives new commits, or is reopened
|
# - Automatically when PR is opened, receives new commits, or is reopened
|
||||||
# - Manually via /review comment on PR
|
# - Manually via /review comment on PR
|
||||||
@@ -126,13 +130,13 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ANTHROPIC_BASE_URL: https://api.z.ai/api/anthropic
|
ANTHROPIC_BASE_URL: ${{ vars.AI_REVIEW_BASE_URL }}
|
||||||
REVIEW_MODEL: glm-5.1
|
REVIEW_MODEL: ${{ vars.AI_REVIEW_MODEL }}
|
||||||
ANTHROPIC_AUTH_TOKEN: ${{ secrets.GLM_API_KEY }}
|
ANTHROPIC_AUTH_TOKEN: ${{ secrets.AI_REVIEW_API_KEY }}
|
||||||
ANTHROPIC_MODEL: glm-5.1
|
ANTHROPIC_MODEL: ${{ vars.AI_REVIEW_MODEL }}
|
||||||
ANTHROPIC_DEFAULT_OPUS_MODEL: glm-5.1
|
ANTHROPIC_DEFAULT_OPUS_MODEL: ${{ vars.AI_REVIEW_MODEL }}
|
||||||
ANTHROPIC_DEFAULT_SONNET_MODEL: glm-5.1
|
ANTHROPIC_DEFAULT_SONNET_MODEL: ${{ vars.AI_REVIEW_MODEL }}
|
||||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: glm-5.1
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: ${{ vars.AI_REVIEW_MODEL }}
|
||||||
DISABLE_BUG_COMMAND: '1'
|
DISABLE_BUG_COMMAND: '1'
|
||||||
DISABLE_ERROR_REPORTING: '1'
|
DISABLE_ERROR_REPORTING: '1'
|
||||||
DISABLE_TELEMETRY: '1'
|
DISABLE_TELEMETRY: '1'
|
||||||
@@ -243,7 +247,7 @@ jobs:
|
|||||||
id: claude-review
|
id: claude-review
|
||||||
uses: anthropics/claude-code-action@v1
|
uses: anthropics/claude-code-action@v1
|
||||||
with:
|
with:
|
||||||
anthropic_api_key: ${{ secrets.GLM_API_KEY }}
|
anthropic_api_key: ${{ secrets.AI_REVIEW_API_KEY }}
|
||||||
github_token: ${{ steps.app-token.outputs.token }}
|
github_token: ${{ steps.app-token.outputs.token }}
|
||||||
allowed_non_write_users: ${{ needs.prepare.outputs.contributor_source == 'external' && '*' || '' }}
|
allowed_non_write_users: ${{ needs.prepare.outputs.contributor_source == 'external' && '*' || '' }}
|
||||||
display_report: false
|
display_report: false
|
||||||
|
|||||||
Reference in New Issue
Block a user