Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): clean up worktrees after squash merges #14651

Closedtris203(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/14651/headopened View on GitHub

Showing 13 changed files with 55 additions and 4 deletions (loading 11).

x
0 of 13 viewed, 13 left
36 additions and 2 deletionsapps/server/src/git/GitManager.test.tsModified
View file
@@ -60,6 +60,7 @@
createdPrUrl?: string;
defaultBranch?: string;
pullRequest?: {
+ headSha?: string;
number: number;
title: string;
url: string;
@@ -1127,6 +1128,39 @@
+ it.effect("reads an identified merged PR head afresh without checking out its branch", () =>
+ Effect.gen(function* () {
+ const repoDir = yield* makeTempDir("t3code-git-manager-");
+ yield* initRepo(repoDir);
+ const reference = "https://github.com/pingdotgg/t3code/pull/216";
+ const { manager } = yield* makeManager({
+ ghScenario: {
+ pullRequest: {
+ number: 216,
+ title: "Squash merged",
+ url: reference,
+ baseRefName: "release",
+ headRefName: "feature",
+ headSha: "a".repeat(40),
+ state: "merged",
+ },
+ },