Repository navigation
Description
Describe the feature or problem you’d like to solve
Currently, there are several places in GitHub Desktop where how the interaction should work in the app when someone is on a fork is highly dependent on someone's relationship to the project. In other words, are they on the fork because they're just trying to contribute to the upstream repo? Is this a "long-running" fork that's intended to diverge entirely from upstream? Something else? In talking through this, we think there may be several connected elements that may operate similarly depending on the preference.
Creating an issue
Using fork to contribute to upstream: Create new issue in upstream repo (documented in #9232)
Using fork to contribute to fork: Create issue in fork repo
Creating a pull request
Using fork to contribute to upstream: Create PR from fork targeting upstream
Using fork to contribute to fork: Create PR from fork targeting fork (this represents a divergence from the default behavior of GitHub.com, which by default targets new PRs toward upstream)
Viewing list of pull requests in the PR tab of the branch list
Using fork to contribute to upstream: View pull requests for the upstream repo
Using fork to contribute to fork: View pull requests for the fork repo
Staying up to date
Using fork to contribute to upstream: Ability to easily stay up to date with latest from upstream repo's default branch
Using fork to contribute to fork: Ability to easily stay up to date with latest from fork
Any others?
These are the ones we've discussed, but there may be other things that likely depend on this preference about whether you're on a fork with the intention of contributing back to upstream, or on a fork because that's where you're contributing to.
My biggest question is whether these are always consistent across these scenarios. In other words, is there ever a time where someone would want to create a PR targeting upstream by default but want to create an issue in their fork (and any of the other combinations)? I think even if that is the case, we could make the defaults align along the lines described here, and give people flexibility to change them.
Activity
ampinsk commentedon Mar 2, 2020
@billygriffin and I chatted through this and landed in a much clearer place! So we're talking about two different kinds of forks, "Contribution Forks", where I am using this fork solely for contributing to the upstream parent project, and "Maintained Forks" a fork of a project that I use for my own purposes.
We realized that github.com pretty strongly discourages Maintained Forks in several ways:
Due to the friction this presents, we're under a new assumption that anyone who wants to maintain a fork for a long period of time has likely created an entirely new repo, breaking the official "fork" connection.
For Desktop's purposes, we believe now it's safe for us to assume as a default that forks will want to interact with the upstream, meaning from the above list, we should default to:
Upstream default
We do believe it is worth it - if simple to implement - to have a repository level setting to allow you to switch to view and interact with your own fork. This setting would default to:
Maintained fork setting: aka, treating it as a normal repo
No matter what, we should be clear about what it is that we're showing and doing (for example, the pull requests list should indicate what list of pull requests we're showing).
I'll update with designs for:
Does this all make sense? Is there anything else we need designs for?
rafeca commentedon Mar 19, 2020
@tierninho pointed out an interesting behaviour in #9316 (review) .
Whenever we decide to implement the distinction between "contribution forks" and "maintained forks",
I think we can make use of the local
gitrepository configuration to differentiate between both of them: if the localgitrepository had anupstreamremote pointing to the parent repository of theoriginremote repository we can assume it's a "contribution fork" and in any other case we can assume it's a "maintained fork".billygriffin commentedon Apr 16, 2020
This issue mostly served as kicking off the discussion, and I think we've got other issues where we'll hash out the details so I'm going to close this one - we can obviously reference it as needed. Thanks so much to @ampinsk for thinking through all these scenarios in such detail with me.