Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a merge no longer settles an unlinked thread on another thread's PR branch #40564

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/40564/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 117 additions and 3 deletions (loading 1).

x
0 of 4 viewed, 4 left
7 additions and 1 deletionapps/server/src/orchestration-v2/ProjectionSettlement.test.tsModified
View file
@@ -433,7 +433,7 @@
const store = yield* ProjectionStore.ProjectionStoreV2;
yield* createThread("no-links");
yield* createThread("empty-links", { pullRequests: [] });
- yield* createThread("archived-link", {
+ const archived = yield* createThread("archived-link", {
archivedAt: old,
pullRequests: [pullRequestLink(1)],
});
@@ -459,6 +459,12 @@
(yield* store.getThreadsWithPullRequests(open)).map((thread) => thread.id),
[open],
+ assert.deepEqual(
+ (yield* store.getThreadsWithPullRequests(undefined, { includeArchived: true })).map(
+ (thread) => thread.id,
+ ),
+ [settled, archived, open],
+ );
}).pipe(Effect.provide(layerSql)),
​
3 additions and 2 deletionsapps/server/src/orchestration-v2/ProjectionStore.tsModified
View file
@@ -684,6 +684,7 @@
) => Effect.Effect<ReadonlyArray<ProjectionSettlementCandidate>, ProjectionStoreV2Error>;
readonly getThreadsWithPullRequests: (