Skip to content

ci: hoist Claude review env to job-level and externalize base URL#22

Merged
moose-lab merged 1 commit into
mainfrom
ci/hoist-env-and-externalize-url
May 26, 2026
Merged

ci: hoist Claude review env to job-level and externalize base URL#22
moose-lab merged 1 commit into
mainfrom
ci/hoist-env-and-externalize-url

Conversation

@moose-lab

Copy link
Copy Markdown
Owner

Two fixes in one

1. Move env vars from step-level to job-level

`anthropics/claude-code-action@v1` is a composite action, and step-level `env:` on the action invocation does not propagate to a composite action's internal sub-steps. The action's env validation runs inside one of those sub-steps, sees `ANTHROPIC_API_KEY` empty, and bails with "Environment variable validation failed". Hoisting the env to job-level fixes the propagation.

Verified diagnosis: in the failing runs, the env block showed `ANTHROPIC_API_KEY: ***` on the action's top-level invocation but `ANTHROPIC_API_KEY:` (blank) on the inner step where validation runs.

2. Externalize the base URL to a repo secret

Moves the Claude review endpoint from a literal value in the workflow file into the `ANTHROPIC_BASE_URL` repo secret. Cleaner separation of config from code, and lets the endpoint be swapped without code changes.

Verification plan

This PR itself will hit the workflow-validation skip (because it modifies the workflow file). After merge, push an empty commit to `test/claude-review-smoke` to retrigger PR #21, where the action will run for real against the new main and should both pass and post a review comment.

@moose-lab moose-lab merged commit c9ddb7d into main May 26, 2026
3 of 4 checks passed
@moose-lab moose-lab deleted the ci/hoist-env-and-externalize-url branch May 26, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant