When opening Web IDE follow path to Fork if exists
Problem to solve
Currently when a user doesn't have permissions to commit or create a merge request in a project we offer the user the option to fork the project when opening the Web IDE. However, if a user already has a fork then we open the upstream project and not the forked project in the Web IDE. This means users are "doomed to fail" as they won't be able to make changes, or save their changes and make them in the appropriate context.
Further details
Our current process checks for the existence of the fork to correctly allow a user to fork, but we don't use that information to correctly open the users fork if it exists.
Proposal
If a user has an existing fork AND can't commit/create merge request in the upstream project we should open the users fork in the Web IDE. This will provide a potentially happy path to be able to make changes and then submit a Merge Request upstream.
In a future iteration we should provide a notification if the fork is out of date. And ultimately we should provide a way to fetch the upstream project.
UX proposal
Availability and Testing
package-and-qa
manual job needs to be run in MR. Low level unit/system test coverage would be beneficial.