Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): reject PR watches when hosting dependencies are unavailable #33389

Mergedcomplynx(GitHub profile, opens in a new tab)merged 7 commits intomain fromrefs/pull/33389/headmerged by juliusmarminge View on GitHub

Showing 11 changed files with 2 additions and 87 deletions (loading 10).

x
0 of 11 viewed, 11 left
2 additions and 87 deletionsapps/server/src/mcp/toolkits/pullRequests/handlers.test.tsModified
View file
@@ -26,6 +26,7 @@
v2PullRequestThread,
} from "../../../orchestration-v2/testkit/pullRequestFixtures.ts";
import * as ProjectService from "../../../project/ProjectService.ts";
+import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts";
import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts";
import * as McpInvocationContext from "../../McpInvocationContext.ts";
import * as McpToolAccess from "../../McpToolAccess.ts";
@@ -167,6 +168,7 @@
return { sequence: 1, storedEvents: [] };
});
const layerDependencies = Layer.mergeAll(
+ Layer.mock(PullRequestWatchService.PullRequestWatchService)({}),
Layer.mock(ProjectService.ProjectService)({
getShell: () => Effect.succeed(Option.fromNullishOr(project)),
listShells: () => Effect.succeed(options.projects ?? (project ? [project] : [])),
@@ -278,93 +280,6 @@
}),
​
- it.effect("watching an unlinked pull request links it first", () =>
- Effect.gen(function* () {
- const harness = yield* makeHarness();
- const result = yield* harness.call("watch_pull_request", {
- url: "https://github.com/t3tools/t3code/pull/9",
- });
- expect(result).toMatchObject({ number: 9, watching: false, wasWatching: false });
- expect(yield* Ref.get(harness.commands)).toMatchObject([