Skip to content

Fix base branch in create view not getting updated early enough#8825

Merged
alexr00 merged 1 commit into
mainfrom
alexr00/welcome-krill
Jul 3, 2026
Merged

Fix base branch in create view not getting updated early enough#8825
alexr00 merged 1 commit into
mainfrom
alexr00/welcome-krill

Conversation

@alexr00

@alexr00 alexr00 commented Jul 3, 2026

Copy link
Copy Markdown
Member

this fixes the wrong title being used when the base branch isn't the default branch

this fixes the wrong title being used when the base branch isn't the default branch
Copilot AI review requested due to automatic review settings July 3, 2026 08:42
@alexr00 alexr00 enabled auto-merge (squash) July 3, 2026 08:42
@alexr00 alexr00 self-assigned this Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the create-pull-request webview initialization so the detected base branch/owner is applied to the model before title/description generation runs, preventing incorrect default titles when the base branch differs from the repository default.

Changes:

  • Added a onBaseBranchDetected(baseOwner, baseBranch) hook to BaseCreatePullRequestViewProvider that runs before getTitleAndDescription.
  • Wired the hook into base param initialization so subclasses can update model state early.
  • Moved CreatePullRequestViewProvider’s base owner/branch model updates from its getCreateParams override into the new hook.
Show a summary per file
File Description
src/github/createPRViewProvider.ts Introduces an early base-branch detection hook and uses it to update the create-PR model before computing the default title/description.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Low

@alexr00 alexr00 merged commit 68aaf5e into main Jul 3, 2026
8 checks passed
@alexr00 alexr00 deleted the alexr00/welcome-krill branch July 3, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants