Skip to content

Fix PR preview base branch for forks contributing to their parent - #23151

Merged
tidy-dev merged 1 commit into
desktop:developmentfrom
DylanDevelops:ravel/fork-default-branch-bugfix
Nov 10, 2026
Merged

tidy-dev merged 1 commit into
desktop:developmentfrom
DylanDevelops:ravel/fork-default-branch-bugfix

Conversation

@DylanDevelops

Copy link
Copy Markdown
Contributor

Closes #23120

Description

The pull request preview compared the current branch against the fork’s own default branch, even when the fork is set to contribute to its parent. The pull request itself targets the parent, so a fork that’s behind showed every upstream commit, unrelated file changes and a false merge-conflict warning.

This PR uses the existing findContributionTargetDefaultBranch() helper for the preview’s base branch and for the “Default branch” entry in the base picker, so the preview matches the PR that opens on GitHub. Repositories that aren’t forks, and forks set to “For my own purposes”, work as before.

Release notes

Notes: [Fixed] Pull request preview for forks compares against the parent repository's default branch

@DylanDevelops
DylanDevelops requested a review from a team as a code owner November 9, 2026 23:10
@DylanDevelops
DylanDevelops requested review from BagToad and a balanced review from Copilot November 9, 2026 23:10

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added external Pull request originating outside of the Desktop core team needs-triage ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed needs-triage labels Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for your pull request! While it doesn't meet all of our standard requirements, it appears to be a small, focused contribution and has been routed to the team for review.

Note: We still encourage linking to an issue with the help wanted label when possible, as it helps us prioritize and track contributions.

@DylanDevelops DylanDevelops changed the title Use contribution target branch for PRs Fix PR preview base branch for forks contributing to their parent Nov 9, 2026

@tidy-dev tidy-dev 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.

Thanks!

@tidy-dev
tidy-dev merged commit 2e793bb into desktop:development Nov 10, 2026
23 checks passed
@DylanDevelops
DylanDevelops deleted the ravel/fork-default-branch-bugfix branch November 10, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external Pull request originating outside of the Desktop core team ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

**Open a pull request** preview compares against fork's default branch instead of parent's

3 participants