@expo/code-review-cli 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -56
- package/build/commands/ci.js +137 -26
- package/build/commands/init.js +18 -13
- package/build/core/adjudicate.js +1 -0
- package/build/core/auth.js +4 -1
- package/build/core/claude-code.js +315 -43
- package/build/core/coordinator.js +2 -1
- package/build/core/exec.js +10 -0
- package/build/core/opencode.js +8 -9
- package/build/core/render.js +10 -3
- package/build/core/review-cache.js +108 -0
- package/build/core/review.js +18 -11
- package/build/core/router.js +2 -1
- package/build/core/schema.js +23 -21
- package/build/core/stack-confirm.js +2 -1
- package/build/core/verify.js +1 -0
- package/build/reporters/github.js +3 -3
- package/package.json +1 -1
- package/templates/agents/security.md +3 -3
- package/templates/atlantis.yml +11 -5
- package/templates/command.yml +14 -7
- package/templates/config.jsonc +31 -39
- package/templates/coordinator.md +2 -2
- package/templates/workflow.yml +15 -7
package/templates/workflow.yml
CHANGED
|
@@ -67,6 +67,13 @@ jobs:
|
|
|
67
67
|
# to save an empty cache and error).
|
|
68
68
|
package-manager-cache: false
|
|
69
69
|
|
|
70
|
+
# The anthropic/… models in .expo-code-review/config.jsonc run through the
|
|
71
|
+
# Claude Code CLI (the claude-code engine). Pinned exactly — an unpinned CLI
|
|
72
|
+
# would silently drift on every CI run; bump it deliberately. Remove this
|
|
73
|
+
# step if you switch every model to an OpenCode-served provider.
|
|
74
|
+
- name: Install Claude Code CLI
|
|
75
|
+
run: npm install -g @anthropic-ai/claude-code@2.1.212
|
|
76
|
+
|
|
70
77
|
# SECURITY: the TRUSTED BASE checkout above includes every
|
|
71
78
|
# .expo-code-review/config.jsonc + routing.jsonc, whose auth.tokenEnv names the
|
|
72
79
|
# env var the CLI forwards as the model credential. The canonical guard ships
|
|
@@ -87,7 +94,7 @@ jobs:
|
|
|
87
94
|
- name: Guard config tokenEnv (root + routing + all scopes)
|
|
88
95
|
env:
|
|
89
96
|
# (Comma-separated set for a multi-credential auth.providers config.)
|
|
90
|
-
ECR_EXPECTED_TOKEN_ENV: ${{ vars.ECR_EXPECTED_TOKEN_ENV || '
|
|
97
|
+
ECR_EXPECTED_TOKEN_ENV: ${{ vars.ECR_EXPECTED_TOKEN_ENV || 'CLAUDE_CODE_REVIEW_SHARED_API_TOKEN' }}
|
|
91
98
|
run: npx --yes -p "@expo/code-review-cli@$ECR_VERSION" ecr verify-config
|
|
92
99
|
|
|
93
100
|
- name: Run AI review
|
|
@@ -101,12 +108,13 @@ jobs:
|
|
|
101
108
|
# honor (root config.jsonc, or routing.jsonc defaults.auth) differs from
|
|
102
109
|
# this — it catches what the guard step above can't. Keep it in sync
|
|
103
110
|
# with the guard.
|
|
104
|
-
ECR_EXPECTED_TOKEN_ENV: ${{ vars.ECR_EXPECTED_TOKEN_ENV || '
|
|
105
|
-
#
|
|
106
|
-
# Store it as a repo secret
|
|
107
|
-
#
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
ECR_EXPECTED_TOKEN_ENV: ${{ vars.ECR_EXPECTED_TOKEN_ENV || 'CLAUDE_CODE_REVIEW_SHARED_API_TOKEN' }}
|
|
112
|
+
# Anthropic review credential — the env var named by auth.tokenEnv in
|
|
113
|
+
# config.jsonc. Store it as a repo secret: an `sk-ant-oat…` token minted
|
|
114
|
+
# by `claude setup-token`, or an `sk-ant-api…` Console key (the Claude
|
|
115
|
+
# Code CLI reads either).
|
|
116
|
+
CLAUDE_CODE_REVIEW_SHARED_API_TOKEN: ${{ secrets.CLAUDE_CODE_REVIEW_SHARED_API_TOKEN }}
|
|
117
|
+
# Optional: override the model for every agent.
|
|
110
118
|
REVIEWER_MODEL: ${{ vars.REVIEWER_MODEL }}
|
|
111
119
|
|
|
112
120
|
# Observability: the per-run log (token/cache/cost totals + per-pass timing +
|