fix(ci): replace gh pr review with gh api for checkout-free approval#433
Conversation
gh pr review implicitly requires a local git repository, causing "fatal: not a git repository" in ci-gated-approve which runs without checkout. This broke OpenSSF Scorecard Code-Review scoring by preventing Justice Bot from recording approvals on PRs. Both approve steps (dependency-review and ci-gated-approve) now use gh api directly, consistent with the existing duplicate-check pattern and the no-checkout security stance. Signed-off-by: Null;Variant <null@nullvariant.com> 🖥️ IDE: [VS Code](https://code.visualstudio.com/) 🔌 Extension: [Claude Code](https://claude.ai/download) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Model-Raw: claude-opus-4-6-20250414
Review Summary by QodoReplace gh pr review with gh api for checkout-free approvals
WalkthroughsDescription• Replace gh pr review with gh api for checkout-free PR approvals • Fixes Justice Bot approval failures in ci-gated-approve job • Restores OpenSSF Scorecard Code-Review scoring capability • Maintains consistency with existing duplicate-check pattern Diagramflowchart LR
A["gh pr review<br/>requires git repo"] -->|broken in<br/>no-checkout job| B["ci-gated-approve fails"]
B -->|breaks| C["OpenSSF Scorecard<br/>Code-Review score"]
D["gh api direct call<br/>no git required"] -->|fixes| E["ci-gated-approve succeeds"]
E -->|restores| F["OpenSSF Scorecard<br/>Code-Review score"]
File Changes1. .github/workflows/justice-bot.yml
|
Code Review by Qodo
1. Repeated bot approvals
|
🐰 Mimi's Validation Report ✅All checks are looking good! Great job! 🎉 ⏳ Some checks are still running. I will keep watching!
This report was carefully prepared by nullvariant-mimi[bot] |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
🕊️ Ciel's Mediation 💤*~~ drifting lazily through still air ~~ The zoo is napping today...* 1 zoo member has reviewed this PR.
😴 A quiet day at the zoo. Only one member peeked at this PR.
This mediation was peacefully delivered by nullvariant-ciel[bot] |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|



Summary
gh pr reviewimplicitly requires a local git repository, causingfatal: not a git repositoryin theci-gated-approvejob which intentionally runs withoutactions/checkoutdependency-reviewandci-gated-approve) now usegh apidirectly, consistent with the existing duplicate-check pattern and the no-checkout security designTest plan
ci-gated-approvejob succeeds on the next PRnullvariant-justice[bot]