Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): background GitHub polling uses ~74% fewer calls with batched GraphQL #14673

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/14673/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 15 changed files with 149 additions and 23 deletions (loading 12).

x
0 of 15 viewed, 15 left
26 additions and 0 deletionsapps/server/src/git/GitManager.test.tsModified
View file
@@ -13,6 +13,7 @@
import * as Option from "effect/Option";
import * as PlatformError from "effect/PlatformError";
import * as References from "effect/References";
+import * as Result from "effect/Result";
import * as Schema from "effect/Schema";
import * as Scope from "effect/Scope";
import { TestClock } from "effect/testing";
@@ -32,6 +33,7 @@
TextGenerationError,
} from "@t3tools/contracts";
import * as GitHubCli from "../sourceControl/GitHubCli.ts";
+import { decodeGitHubPullRequestListJson } from "../sourceControl/gitHubPullRequests.ts";
import * as GitLabCli from "../sourceControl/GitLabCli.ts";
import * as TextGeneration from "../textGeneration/TextGeneration.ts";
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
@@ -510,6 +512,30 @@
return {
service: {
execute,
+ // The fake answers the CLI shape, so batched lookups read it the way the fallback does.
+ listPullRequestsByHead: (input) =>
+ execute({
+ cwd: input.cwd,
+ args: [
+ "pr",
+ "list",
+ "--head",