Fix New Workspace PR worktree creation (#1565)

* Fix PR worktree creation from New Workspace

* Use fixture default branch in GitHub E2E clone
This commit is contained in:
Mohamed Boudra
2026-06-17 15:15:58 +08:00
committed by GitHub
parent 11abbcc630
commit 1340a80144
5 changed files with 294 additions and 16 deletions
@@ -20,11 +20,13 @@ export function pickerItemToCheckoutRequest(
switch (item.kind) {
case "branch":
return { action: "branch-off", refName: item.name };
case "github-pr":
case "github-pr": {
const headRefName = item.item.headRefName?.trim();
return {
action: "checkout",
refName: item.item.headRefName ?? "",
...(headRefName ? { refName: headRefName } : {}),
githubPrNumber: item.item.number,
};
}
}
}