Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): threads settle as soon as branch status sees their PR merge #17148

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/17148/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 4 changed files with 98 additions and 0 deletions (loading 1).

x
0 of 4 viewed, 4 left
52 additions and 0 deletionsapps/server/src/git/GitManager.test.tsModified
View file
@@ -1772,6 +1772,58 @@
+ it.effect("branch PR lookup announces a pull request when it reads it merged", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const repoDir = yield* makeTempDir("t3code-git-manager-");
+ yield* initRepo(repoDir);
+ const remoteDir = yield* createBareRemote();
+ yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]);
+ for (const branch of ["feature/merges-later", "feature/already-merged"]) {
+ yield* runGit(repoDir, ["checkout", "-b", branch, "main"]);
+ yield* runGit(repoDir, ["push", "-u", "origin", branch]);
+ }
+ const pullRequest = (number: number, headRefName: string, state: string) =>
+ encodeCliJson([
+ {
+ number,
+ title: headRefName,
+ url: `https://github.com/pingdotgg/codething-mvp/pull/${number}`,
+ baseRefName: "main",
+ headRefName,
+ state,
+ updatedAt: "2026-04-07T15:00:00Z",
+ },
+ ]);
+ const { manager } = yield* makeManager({
+ ghScenario: {
+ prListSequenceByHeadSelector: {