From b747670af87b0175770130416ebcfe5a69d78854 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Fri, 3 Jul 2026 10:41:25 +0200 Subject: [PATCH] Fix base branch in create view not getting updated early enough this fixes the wrong title being used when the base branch isn't the default branch --- src/github/createPRViewProvider.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/github/createPRViewProvider.ts b/src/github/createPRViewProvider.ts index 1a9d245633..5281bbe673 100644 --- a/src/github/createPRViewProvider.ts +++ b/src/github/createPRViewProvider.ts @@ -189,6 +189,10 @@ export abstract class BaseCreatePullRequestViewProvider; + // Called once the detected base branch is known, before getTitleAndDescription runs. + // Subclasses can override to update model state that getTitleAndDescription depends on. + protected onBaseBranchDetected(_baseOwner: string, _baseBranch: string): void { } + protected getTitleAndDescriptionProvider(name?: string) { return this._folderRepositoryManager.getTitleAndDescriptionProvider(name); } @@ -214,6 +218,9 @@ export abstract class BaseCreatePullRequestViewProvider { const params = await super.getCreateParams(); - this.model.baseOwner = params.defaultBaseRemote!.owner; - this.model.baseBranch = params.defaultBaseBranch!; // Pre-fetch branches so they're cached when the user opens the branch picker this.prefetchBranches(params.defaultBaseRemote!); return params;