ci: graceful-skip ggshield when GITGUARDIAN_API_KEY isn't set#39
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 scan GitHub Actions workflow to gracefully no-op when GITGUARDIAN_API_KEY isn’t configured, instead of failing the workflow run. This aligns the repo’s CI behavior with the upstream PowerShell module template convention.
Changes:
- Adds a job-level env passthrough for
GITGUARDIAN_API_KEY. - Gates the checkout and ggshield steps with
if: env.GITGUARDIAN_API_KEY != ''so the job cleanly skips when the secret is unset.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| env: | ||
| GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| if: env.GITGUARDIAN_API_KEY != '' | ||
| with: |
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