Automated PR code review with nex-pro
A GitHub Actions workflow that runs nex-pro on every PR diff, comments inline review notes, and gates merging if critical issues are found. ~$0.02 per medium-size PR.
Outline
- Setting up
nex-proas a GitHub Actions secret - Parsing the unified diff into per-file chunks small enough for 32K context
- Prompt template: "you are a senior engineer reviewing this diff — output JSON with issues, severity, line numbers"
- Posting review comments via the GitHub REST API (one comment per issue, on the right line)
- Severity gating: fail the check if any "critical" issue is detected
- Cost tracking: log per-PR spend to a CSV; alert on outliers
- Limitations: not great at full-architecture review (needs the whole repo), good at: dead code, missing error handling, obvious security bugs, style consistency
Ship-date guess
Sprint 2, week 4 (within the next two weeks).