Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): use the checkout's GitHub login for requests #19013

Closedmihaicrisan04(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/19013/headopened View on GitHub

Showing 20 changed files with 99 additions and 10 deletions (loading 17).

x
0 of 20 viewed, 20 left
1 addition and 0 deletionsapps/server/src/assets/sourceControlMediaResponse.tsModified
View file
@@ -63,6 +63,7 @@
const response = yield* fetchMedia({
url: asset.url,
+ cwd: asset.cwd,
headers: forwarded,
...(repository === undefined ? {} : { repository }),
});
60 additions and 0 deletionsapps/server/src/pullRequest/PullRequestService.test.tsModified
View file
@@ -2819,6 +2819,66 @@
+it.effect("loads line counts across checkouts with different credentials", () =>
+ Effect.gen(function* () {
+ const asked: Array<{ cwd: string; repositories: ReadonlyArray<string> }> = [];
+ const identityFor = (cwd: string) => ({
+ accountId: "1",
+ viewer: "work",
+ credentialFingerprint: cwd.startsWith("/ops/") ? "ops" : "work",
+ });
+ const service = yield* makeService({
+ projects: [
+ project({ id: "p1", title: "web", workspaceRoot: "/work/web", repository: "acme/web" }),
+ project({ id: "p2", title: "api", workspaceRoot: "/work/api", repository: "acme/api" }),
+ project({ id: "p3", title: "ops", workspaceRoot: "/ops/infra", repository: "acme/infra" }),
+ ],