fix(server): clarify source control errors for unknown providers #11131
ClosedGuria(GitHub profile, opens in a new tab)wants to merge 2 commits into
main fromrefs/pull/11131/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
- apps/server/src/sourceControl/SourceControlProviderRegistry.ts lines 68 to 70Resolvedby Guria(GitHub profile, opens in a new tab)@@ -62,3 +62,7 @@6262 }6363 >()("t3/sourceControl/SourceControlProviderRegistry") {}646465+function unsupportedProviderDetail(kind: SourceControlProviderKind): string {66+ return kind === "unknown"67+ ? "No source control provider was detected for this project."68+ : `No ${kind} source control provider is registered.`;
juliusmarminge added labelsmacroscope-review
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
1e870171-047e-42c9-97dc-ab9667dc0236📥 Commits
Reviewing files that changed from the base of the PR and between 42d1b9ac23d9151afdab1507b19cbc9627ce86cf and 8cda5db6e8a74e9df4d061005b2a14b228caef8b.
📒 Files selected for processing (3)
apps/server/src/sourceControl/SourceControlProviderRegistry.test.tsapps/server/src/sourceControl/SourceControlProviderRegistry.tspackages/contracts/src/sourceControl.tsIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
The registry now returns distinct details for unknown and unregistered providers. Error messages omit the provider name for unknown providers. Tests validate the updated detail and message.
Changes#
Source control error handling
apps/server/src/sourceControl/SourceControlProviderRegistry.ts,packages/contracts/src/sourceControl.ts,apps/server/src/sourceControl/SourceControlProviderRegistry.test.tsSourceControlProviderError.messageomits the provider name for unknown providers. The test validates the detail and message formats.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
8cda5The PR clarifies unknown-provider errors and updates focused coverage; no merge-blocking issue remains.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Warning
Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use
path_filtersto narrow the review scope.Comment `@coderabbitai help` to get the list of available commands.