Skip to content

Commit 7f8acac

Browse files
fix(server): repository-only GitLab links resolve through the checkout URL
resolveLink read the merge request with webUrl: null, which marks a raw API selector. On a checkout under a path prefix, that read the prefixed path literally instead of resolving the project through glab. Leaving webUrl unset lets the project's own repository inherit its HTTP checkout URL, while other repositories already drop it. AI-assisted; verified with the tests and tools listed above.
1 parent 0ca8023 commit 7f8acac

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ describe("pull request toolkit handlers", () => {
497497
const watched = yield* harness.call("watch_pull_request", target);
498498
expect([linked.url, watched.url]).toEqual([url, url]);
499499
expect(yield* Ref.get(harness.detailRequests)).toEqual([
500-
{ projectId: PROJECT_ID, host: "code.example", ...target, webUrl: null },
501-
{ projectId: PROJECT_ID, host: "code.example", ...target, webUrl: null },
500+
{ projectId: PROJECT_ID, host: "code.example", ...target },
501+
{ projectId: PROJECT_ID, host: "code.example", ...target },
502502
]);
503503
expect(yield* Ref.get(harness.commands)).toMatchObject([
504504
{ type: "thread.pull-request.link", ...target, url, repositoryWebUrl: url },

‎apps/server/src/mcp/toolkits/pullRequests/handlers.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ const make = Effect.gen(function* () {
284284
host: target.host,
285285
repository: target.repository,
286286
number: target.number,
287-
webUrl: null,
288287
});
289288
const url = PullRequestService.withoutUrlCredentials(detail.url);
290289
return { url, repositoryWebUrl: url };

0 commit comments

Comments
 (0)