Rename git hosting provider fields to source control provider

- Rename shared/server status fields and detectors from hostingProvider to sourceControlProvider
- Move provider schema into contracts/sourceControl and update status/event tests
- Refresh branch toolbar labels from switchRef to checkout
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-05-02 14:22:14 -07:00
1 parent d1bbd73e02
commit b3d90d4221
12 files changed
+48 -49

No files matched your search

+4 -4
View File
@@ -26,7 +26,7 @@ import {
ModelSelection,
} from "@t3tools/contracts";
import {
detectGitHostingProviderFromRemoteUrl,
detectSourceControlProviderFromGitRemoteUrl,
mergeGitStatusParts,
resolveAutoFeatureBranchName,
sanitizeBranchFragment,
@@ -659,13 +659,13 @@ export const makeGitManager = Effect.fn("makeGitManager")(function* () {
.pipe(
Effect.catchIf(isNotGitRepositoryError, () => Effect.succeed(nonRepositoryStatusDetails)),
);
const hostingProvider = details.isRepo
const sourceControlProvider = details.isRepo
? yield* resolveHostingProvider(cwd, details.branch)
: null;
return {
isRepo: details.isRepo,
...(hostingProvider ? { hostingProvider } : {}),
...(sourceControlProvider ? { sourceControlProvider } : {}),
hasPrimaryRemote: details.hasOriginRemote,
isDefaultRef: details.isDefaultBranch,
refName: details.branch,
@@ -733,7 +733,7 @@ export const makeGitManager = Effect.fn("makeGitManager")(function* () {
(yield* readConfigValueNullable(cwd, `remote.${preferredRemoteName}.url`)) ??
(yield* readConfigValueNullable(cwd, "remote.origin.url"));
return remoteUrl ? detectGitHostingProviderFromRemoteUrl(remoteUrl) : null;
return remoteUrl ? detectSourceControlProviderFromGitRemoteUrl(remoteUrl) : null;
});
const resolveRemoteRepositoryContext = Effect.fn("resolveRemoteRepositoryContext")(function* (