ci: gate node sync on a single approval#399
Conversation
Mints the GitHub App token once in the prepare job and propagates it via needs.prepare.outputs.token to sync-files. Only prepare declares the Node Sync environment, so the Required-reviewers rule fires once per run instead of once per gated job.
✅ Deploy Preview for genlayer-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
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 (2)
📝 WalkthroughWalkthroughThe documentation and workflow files have been updated to centralize GitHub App token generation. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Description
Reduces the docs-sync workflow from two approval prompts per run to one.
The
Node SyncGitHub Environment carries a Required-reviewers protection rule, and that rule fires once per job that declares the environment. Previously bothprepareandsync-filesdeclared it, so the team had to approve twice for every sync.Changes
.github/workflows/sync-docs-from-node.yml:preparejob now mints the App token unconditionally (removed theif: version == 'latest'gate, since downstream jobs need it regardless) and exposes it asoutputs.token.sync-filesjob dropsenvironment: Node Syncand its own duplicate token-mint step. TheClone source repositorystep now reads the token fromneeds.prepare.outputs.token..github/workflows/README.md: documents the single-approval pattern and warns against re-introducing the environment on additional jobs.Security note
actions/create-github-app-tokencallscore.setSecret()on the token, which masks it in the originating job's logs. GitHub Actions' masking does not propagate across job boundaries, so this pattern relies on no downstream step ever printingneeds.prepare.outputs.token. The only consumer isactions/checkout'stoken:input, which doesn't log it. Token TTL is ~1 hour, well above the workflow's typical runtime.Summary by CodeRabbit
Documentation
Refactor