fix: include bodyless reviews in gh-pr-review output #18#19
Conversation
|
Caution Review failedThe pull request is closed. Recent review infoRun configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Files selected for processing (1)
WalkthroughWalkthroughThe ChangesReview rendering logic fix
Estimated code review effort3 (Moderate) | ~15 minutes Possibly related issues
Finishing TouchesGenerate docstrings
Generate unit tests (beta)
Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
Closes #18
Problem
In
src/tools/gh-pr-review.ts, reviews without a body (text) were filtered out on line 55:This dropped formal review decisions like APPROVED or CHANGES_REQUESTED when the reviewer clicked without leaving a comment — making the tool unreliable for merge-gating.
Fix
review.body!non-null assertions with(review.body ?? '').trim() || '(no comment)'(no comment)instead of being droppedChanges
review.body!could crash at runtime"(no comment)"never shown"(no comment)"Testing
Summary by cubic
Include bodyless PR reviews in
gh-pr-reviewoutput so formal decisions (APPROVED, CHANGES_REQUESTED) are shown and merge gating is reliable. Adds null-safe body handling with a “(no comment)” fallback.reviews.(review.body ?? '').trim()with “(no comment)” and 500-char truncation.reviews.length.Written for commit e26879d. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes