GPT 5.x PR Reviewer
Version updated for https://github.com/micahstubbs/gpt-code-review to version v3.3.0.
- This action is used across all versions by ? repositories.
Go to the GitHub Marketplace to find the latest changes.
Action Summary
The GPT 5.x PR Reviewer GitHub Action automates code reviews for pull requests using OpenAI’s GPT-5.x models. It analyzes code changes, provides AI-generated feedback, and can be triggered automatically on pull request events or via specific comments. This action streamlines the code review process, enhances review quality, and saves time by offering intelligent, consistent insights directly in the pull request discussion.
Release notes
What’s New
Batch Posting for Long-Running Reviews - Never lose review work again
This release fixes a critical issue where GitHub App tokens would expire on large PRs, causing all review work to be lost. Reviews now post comments incrementally, ensuring your work is never lost even on very large PRs.
How It Works
- Automatic batching: Posts review comments every 20 files or every 30 minutes (whichever comes first)
- Progress tracking: Each batch shows the batch number, comment count, and elapsed time
- Early warnings: Warns at 40 minutes if approaching the 1-hour token expiration limit
- No work lost: All review progress is saved incrementally, even if the workflow runs for hours
Example Output
✓ Posted review batch: batch 1 with 18 comments (25m elapsed)
✓ Posted review batch: batch 2 with 15 comments (45m elapsed)
✓ Posted review batch: batch 3 (final) with 8 comments (52m elapsed)
Problem Solved
Before: Large PRs with GPT 5.2 Pro + high reasoning effort could take 45+ minutes to process. If the GitHub App token expired after 1 hour, all review work was lost with a “Bad credentials” error.
After: Reviews post incrementally during processing. Even if token expires, you get all the reviews that completed before expiration.
Mitigation Strategies (Documented in README)
- Use built-in GITHUB_TOKEN (doesn’t expire during job, up to 24 hours)
- Filter files more aggressively with INCLUDE_PATTERNS
- Use faster models (GPT 5.2 instead of GPT 5.2 Pro, or lower REASONING_EFFORT)
- Split large PRs into smaller, focused changes
Technical Details
- Implemented batch posting in
src/bot.tswith configurable thresholds - Added elapsed time tracking and warnings
- Updated documentation with GitHub App token limitations
- All 184 tests pass
References
Full Changelog: CHANGELOG.md