"Adopt" a merge request from a fork
Description
GitLab gets a lot of merge requests from forks. Often these are ~"Community Contribution" MRs where the author, for whatever reason, never finishes. To take over and complete the MR for them, we have to:
- Clone the branch from their fork, push to upstream or our own fork
- Create a new MR
- Close the old MR, losing all comments up to that point.
This is inefficient and something of a barrier to completing MRs - especially small ones!
Proposal
If an MR is from a forked project, developers of the main project should be able to "adopt" or "promote" it to a branch. This would:
- Pull the branch on the fork, onto upstream (or another selected fork, for brownie points)
- Change the source branch of the existing MR to point to the new branch
We don't normally allow the source branch to be changed but in this particular case none of the commits in the branch, its merge base, or the MR target are changing. It's a complete no-op, so this should be safe to do.
Once adopted, an MR can be completed at leisure by the adopting team member.
/cc @victorwu @smcgivern
Links / references
Documentation blurb
Overview
What is it? Why should someone use this feature? What is the underlying (business) problem? How do you use this feature?
Use cases
Who is this for? Provide one or more use cases.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature assurance -
Documentation -
Added to features.yml