fix(reusable-ci): move secret env to job scope so step if: gates work#9
Conversation
Step-level env: is materialized too late to be visible in that same step's if: expression. After #8 unblocked YAML parsing, consumer runs began hitting startup_failure because the security and ai-review jobs declared SNYK_TOKEN / ANTHROPIC_API_KEY only at step level while gating the step with `if: env.X != ''`. Hoist those env: blocks to job scope (canonical pattern) so the gate resolves correctly. No behavior change when the secret is present; when absent, the gated step is skipped instead of failing the run. Also adds the missing actions/setup-node step to the security job so `npm audit` has a node toolchain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 27 minutes and 24 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to #8. After YAML parsing was unblocked, consumer runs hit startup_failure because security/ai-review jobs declared SNYK_TOKEN / ANTHROPIC_API_KEY only at step level while gating with
if: env.X != ''. Step-level env is not visible in that same step's if expression. Hoisting env to job scope is the canonical pattern.