Skip to content

Offer branching from upstream default branch in forks - #9268

Merged
kuychaco merged 18 commits into
developmentfrom
feature/fresher-fork-branches
Mar 17, 2020
Merged

kuychaco merged 18 commits into
developmentfrom
feature/fresher-fork-branches

Conversation

@outofambit

@outofambit outofambit commented Mar 12, 2020 •

Copy link
Copy Markdown
Contributor

Closes #7762

Description

This got a bit more involved than I had anticipated.

  • adds extra props for the create branch dialog to include information from the repo's upstream, if it has one
  • modifies render logic in the create branch dialog to default to a "fork scenario" where the upstream default branch is used instead of the local default branch
  • small tweak in create branch git logic to keep desktop from thinking a new branch based on the upstream default branch is a local copy of the upstream default branch
  • adds a feature flag for this

Screenshots

When creating a branch from your fork's default branch, the default is to start from the upstream/default branch
fork-new-branch-def

When creating a branch from another branch on your fork, you choose between starting from where you are on your fork or starting from upstream/default
fork-new-branch-not-def

Release notes

Notes: [Improved] Offer upstream default branch as starting place for new branches in forks

Bunge07
Bunge07 previously approved these changes Mar 15, 2020
@outofambit
outofambit marked this pull request as ready for review March 17, 2020 00:07
Comment thread app/src/ui/app.tsx Resolved
@outofambit
outofambit force-pushed the feature/fresher-fork-branches branch from 58c4afb to 4b79f3f Compare March 17, 2020 00:19
tierninho
tierninho previously approved these changes Mar 17, 2020

@tierninho tierninho 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.

Tested the scenarios around this including create a new upstream branch off existing Master, off an existing branch, and off of a newly created branch. Windows and OSX tests results in the same functionality and when doing a compare the results were inline with expectations, as seen here:

Screen Shot 2020-03-16 at 2 47 30 PM

Some potential things to call out:

  • a user could change the branch name in GitHub.com
  • Not sure if an admin can disable forking midstream, ahead of a user creating the new upstream branch

@kuychaco kuychaco 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.

This looks great @outofambit! 💖

I left one blocking comment/question (denoted by ⚠️), along with some suggestions and clarifying questions. Otherwise this looks fantastic 😍

Comment thread app/src/lib/branch.ts Resolved
Comment thread app/src/lib/feature-flag.ts Resolved
Comment thread app/src/ui/app.tsx Resolved
@outofambit
outofambit dismissed stale reviews from ghost and tierninho via 64756b5 March 17, 2020 16:06
@outofambit
outofambit dismissed a stale review via c00b026 March 17, 2020 16:14
@outofambit
outofambit dismissed a stale review via 637f5c2 March 17, 2020 16:26
@outofambit
outofambit requested a review from kuychaco March 17, 2020 16:26

@kuychaco kuychaco 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.

Awesome! 🚀✨✨✨

@kuychaco
kuychaco merged commit 5cc1bdc into development Mar 17, 2020
@kuychaco
kuychaco deleted the feature/fresher-fork-branches branch March 17, 2020 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fork] Newly created branches on forks don't have latest work from upstream

4 participants