Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): PR tools build URLs through the refined forge they are exposed for #41414

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/41414/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 20 additions and 6 deletions (loading 3).

x
0 of 6 viewed, 6 left
4 additions and 1 deletionapps/server/src/mcp/toolkits/pullRequests/handlers.test.tsModified
View file
@@ -207,7 +207,10 @@
Effect.succeed(id === thread?.id ? v2PullRequestThread(thread) : null),
dispatch,
}),
- Layer.mock(PullRequestService.PullRequestService)(options.pullRequests ?? {}),
+ Layer.mock(PullRequestService.PullRequestService)({
+ addressedProject: () => Effect.succeed(project ?? undefined),
+ ...options.pullRequests,
+ }),
Layer.mock(GitManager.GitManager)(options.git ?? {}),
Layer.succeed(SecureRandom.SecureRandom, testCrypto),
McpToolAccessTestkit.liveThreadsLayer,
9 additions and 5 deletionsapps/server/src/mcp/toolkits/pullRequests/handlers.tsModified
View file
@@ -308,10 +308,9 @@
| typeof PullRequestUnlinkFailedError
| typeof PullRequestForgeError,
) =>
- projects.getShell(thread.projectId).pipe(
- Effect.map(Option.getOrUndefined),
- Effect.mapError((cause) => new Failure({ cause })),
- );
+ pullRequests
+ .addressedProject(thread.projectId)
+ .pipe(Effect.mapError((cause) => new Failure({ cause })));
​
const dispatchFailure =
(Failure: typeof PullRequestLinkFailedError | typeof PullRequestUnlinkFailedError) =>