Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(review): use the selected thread's repository #10816

Closedtris203(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10816/headopened View on GitHub

Showing 3 changed files with 67 additions and 148 deletions (loading 2).

x
0 of 3 viewed, 3 left
67 additions and 148 deletionsapps/server/src/review/ReviewService.test.tsModified
View file
@@ -3,175 +3,94 @@
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Layer from "effect/Layer";
-import * as PlatformError from "effect/PlatformError";
+import * as Path from "effect/Path";
​
import * as ServerConfig from "../config.ts";
-import * as ServerSettings from "../serverSettings.ts";
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts";
+import * as VcsProcess from "../vcs/VcsProcess.ts";
import * as ReviewService from "./ReviewService.ts";
​
-function layer(input: {
- readonly workspaceRoot: string;
- readonly baseDir: string;
- readonly detectCalls?: Array<{ readonly cwd: string }>;
- readonly worktreesDirectory?: string;
- readonly previousWorktreesDirectories?: ReadonlyArray<string>;
-}) {
- return ReviewService.layer.pipe(
- Layer.provide(
- Layer.mock(VcsDriverRegistry.VcsDriverRegistry)({
- get: () => Effect.die("unexpected VCS registry get"),
- resolve: () => Effect.die("unexpected VCS registry resolve"),
- detect: (request) =>
- Effect.sync(() => {
- input.detectCalls?.push({ cwd: request.cwd });
- return null;