Fix Create PR visibility when upstream status is unknown#6492
Fix Create PR visibility when upstream status is unknown#6492AmethystLiang wants to merge 2 commits into
Conversation
Catch errors during hosted review lookup if local blockers are present. This ensures that network or API failures do not completely hide the Create PR preparation UI if we can still guide the user to resolve local issues first.
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
⚔️ Resolve merge conflicts
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/source-control/hosted-review-creation.test.ts (1)
597-632: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression coverage for the other two fallback blockers.
getHostedReviewCreationEligibilitynow also suppresses lookup failures forhasUpstream === falseandbehind > 0, but these tests only cover the dirty path and the rethrow path. Please add one case that expectsblockedReason: 'no_upstream'and one that expectsblockedReason: 'needs_sync'when the lookup rejects, so the new fallback contract stays pinned down.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d302fab5-755d-45f2-a122-bb36fe2debd5
📒 Files selected for processing (2)
src/main/source-control/hosted-review-creation.test.tssrc/main/source-control/hosted-review-creation.ts
Summary
Tests