Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): the PR of a branch renamed in the thread's worktree is found in the same turn #28508

ClosedGourav224(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/28508/headopened View on GitHub

Showing 2 changed files with 20 additions and 1 deletion.

x
0 of 2 viewed, 2 left
17 additions and 0 deletionsapps/server/src/orchestration-v2/RunFinalizationService.test.tsModified
View file
@@ -103,6 +103,22 @@
activeRun: null,
expected: [],
+ {
+ label: "discovers the PR of a branch renamed in the thread's own worktree",
+ branch: "feature",
+ checkedOut: "renamed",
+ worktree: "/repo",
+ activeRun: null,
+ expected: ["/repo"],
+ },
+ {
+ label: "does not refresh a renamed branch in a checkout the thread does not own",
+ branch: "feature",
+ checkedOut: "renamed",
+ worktree: "/elsewhere",
+ activeRun: null,
+ expected: [],
+ },
label: "does not refresh during a newer active run",
branch: "feature",
@@ -148,6 +164,7 @@
Effect.succeed({
id: threadId,
branch: scenario.branch,
+ worktreePath: "worktree" in scenario ? scenario.worktree : null,
activeRunId: scenario.activeRun === null ? null : RunId.make(scenario.activeRun),