Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): load PR uploads from orgs that enforce SAML SSO #19191

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

Showing 2 changed files with 163 additions and 12 deletions.

x
0 of 2 viewed, 2 left
91 additions and 11 deletionsapps/server/src/assets/AssetAccess.test.tsModified
View file
@@ -35,7 +35,9 @@
import * as NativeAppIconResolver from "./NativeAppIconResolver.ts";
import { openMediaFile } from "./MediaFile.ts";
import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
+import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
import * as GitHubCredentials from "@t3tools/source-control-github/server/GitHubCredentials";
+import * as RepositoryIdentityResolver from "../project/RepositoryIdentityResolver.ts";
import { githubMediaResponse } from "./GitHubMediaFetch.ts";
import * as HostProcess from "@t3tools/shared/HostProcess";
​
@@ -197,17 +199,21 @@
expect(authorizations).toEqual([undefined, "Bearer signed-in", "Bearer signed-in"]);
}).pipe(
Effect.provide(
- Layer.mock(GitHubCredentials.GitHubCredentials)({
- get: (host) =>
- ++lookups === 1
- ? Effect.fail(new GitHubCredentials.GitHubNotSignedInError({ host }))
- : Effect.succeed({
- host,
- token: Redacted.make("signed-in"),
- source: "gh" as const,
- fingerprint: "fingerprint",
- }),
- }),
+ Layer.mergeAll(
+ Layer.mock(GitHubApi.GitHubApi)({}),
+ Layer.mock(RepositoryIdentityResolver.RepositoryIdentityResolver)({}),
+ Layer.mock(GitHubCredentials.GitHubCredentials)({