ci: graceful-skip ggshield when GITGUARDIAN_API_KEY isn't set#15
Conversation
Mirrors PowerShellModuleTemplate#28: env-passthrough pattern so a repo without the secret configured no-ops cleanly instead of failing the ggshield workflow run. This repo currently has the secret configured, so this is a defensive alignment with the template — no behavior change today, but matches the convention going forward. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Updates the GitGuardian scanning workflow to avoid failing CI when GITGUARDIAN_API_KEY is not configured, by gating scan steps on a job-level env passthrough instead of relying on secret access in if:.
Changes:
- Adds job-level
env.GITGUARDIAN_API_KEYpassthrough fromsecrets.GITGUARDIAN_API_KEY. - Adds step-level
if: env.GITGUARDIAN_API_KEY != ''guards so checkout + ggshield run only when the secret is present. - Keeps the explicit Dependabot skip at the job level.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Propagates PowerShellModuleTemplate#28 to this repo. Updates
.github/workflows/ggshield.yamlto use the env-passthrough pattern so the GitGuardian Scan job no-ops cleanly whenGITGUARDIAN_API_KEYisn't configured, instead of failing the workflow run.Why
Defensive alignment with the template's new convention. This repo currently has
GITGUARDIAN_API_KEYset, so there's no behavior change today — the gate evaluates true and the scan runs as before. The value is for any future state where the secret is rotated, removed, or unset.Notes
secretscontext isn't available inif:expressions, so the gate uses job-levelenv+ step-levelif: env.X != ''.Test plan
GitGuardian Scanruns (gate evaluates true here)🤖 Generated with Claude Code