docs: Document required GitHub repository secrets#18
Conversation
The bundled CI/CD workflows assume three repository secrets are set (PS_GALLERY_KEY, CODECOV_TOKEN, GITGUARDIAN_API_KEY), but downstream users had no way to discover this short of reading the workflow files and tracing through to the failure modes. Adds a "Repository secrets" section to README documenting each secret with its required/optional status, source, and failure behavior. Adds a corresponding step to Initialize-Template.ps1's post-init "Next steps" output so users see the reminder right when they finish init, before their first push to GitHub triggers CI runs that need the secrets. Also clarifies the PS_GALLERY_KEY -> PSGALLERY_API_KEY env var mapping that the publish workflow performs (one of those subtleties that's easy to misconfigure when reading the workflow file directly). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds README documentation for repository GitHub Actions secrets (which workflows consume them and failure behavior) and updates CHANGELOG. Updates Initialize-Template.ps1 post-init “Next steps” message to instruct configuring repository secrets (with README link) before the first push. ChangesRepository secrets documentation + init message
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
Documents the GitHub Actions repository secrets required (or optional) for the template’s bundled CI/CD workflows, aiming to make first-run failures more discoverable for new template-derived repos.
Changes:
- Add a new “Repository secrets” section to the template-facing
README.mdand link to it from the Quick start. - Update
Initialize-Template.ps1“Next steps” output to remind users to configure repository secrets. - Add an
[Unreleased]changelog entry describing the documentation update.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Adds a “Repository secrets” section and references it from Quick start. |
| Initialize-Template.ps1 | Inserts a post-init next-step reminder to configure GitHub repository secrets. |
| CHANGELOG.md | Notes the new documentation and init-script messaging under [Unreleased]. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
README.mddocumenting the three GitHub Actions secrets the bundled workflows expect:PS_GALLERY_KEY,CODECOV_TOKEN,GITGUARDIAN_API_KEYInitialize-Template.ps1's post-init "Next steps" output, between the build-test step and the first push[Unreleased]Why
When initializing a module from this template, the bundled CI/CD workflows fail in opaque ways if secrets aren't set:
PublishModuleToPowerShellGallery.yamlfails at PowerShellBuild's authentication assertion ifPS_GALLERY_KEYisn't setggshield.yamlfails on every push with "Invalid GitGuardian API key" ifGITGUARDIAN_API_KEYisn't setCI.yamlsilently skips the codecov upload step ifCODECOV_TOKENisn't set (gated withfail_ci_if_error: false)None of this is documented anywhere in the template — not in the README,
AGENTS.md, or any of the 12 files ininstructions/. New users hit these failures and have to trace through the workflow YAML to figure out what's needed and where to get it.This PR adds documentation in the two highest-leverage places:
The note about
PS_GALLERY_KEYmapping to env varPSGALLERY_API_KEYheads off another easy misconfiguration — someone reading the publish workflow YAML might be tempted to name the secretPSGALLERY_API_KEYdirectly.Test plan
Write-Hostblock, CHANGELOG onlyFuture improvements (out of scope)
ggshield.yamlcouldif:-gate itself onsecrets.GITGUARDIAN_API_KEY != ''to no-op gracefully when the secret is absent (mirroring the existingif: github.actor != 'dependabot[bot]'gate). Worth a separate PR.PS_GALLERY_KEY/PSGALLERY_API_KEYnaming difference could be unified by renaming the secret toPSGALLERY_API_KEYdirectly — but that would be a breaking change for existing template-derived repos, so kept as-is and documented instead.Summary by CodeRabbit