Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a repository on an unrecognized host no longer fails every PR status lookup #19030

MergedAdEx-Partners-DE(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19030/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 26 additions and 6 deletions.

x
0 of 2 viewed, 2 left
15 additions and 0 deletionsapps/server/src/sourceControl/SourceControlProviderRegistry.test.tsModified
View file
@@ -181,6 +181,21 @@
}),
​
+it.effect("lists no change requests for a repository on an unrecognized host", () =>
+ Effect.gen(function* () {
+ const registry = yield* makeRegistry({
+ remotes: [{ name: "origin", url: "https://git.example.internal/team/repo.git" }],
+ });
+ const provider = yield* registry.resolve({ cwd: "/repo" });
+​
+ assert.strictEqual(provider.kind, "unknown");
+ assert.deepStrictEqual(
+ yield* provider.listChangeRequests({ cwd: "/repo", headSelector: "master", state: "all" }),
+ [],
+ );
+ }),
+);
+​
it.effect("retains VCS detection failures with structured cwd context", () =>
Effect.gen(function* () {
const cause = new VcsRepositoryDetectionError({
11 additions and 6 deletionsapps/server/src/sourceControl/SourceControlProviderRegistry.tsModified
View file
@@ -67,13 +67,18 @@
): SourceControlProvider.SourceControlProvider["Service"] {
return SourceControlProvider.SourceControlProvider.of({
kind,