Detect if a Merge Request with the same origin and destination branches already exist
Description
Users with rights to create Merge Requests can see a "Merge Request" button next to each item in the "Repository/Branches" page:
This "Merge Request" button sends you to the "New Merge Request" page. However, these branches may have Merge Requests already open. So, you can end having several Merge Requests with the same origin and destination branches.
The same happens at the "New Merge Request" page and the "Change Branches" page. It isn't detected if already exists a Merge Request with the same origin and destination branches.
Proposal
To prevent creating a second Merge Request with the same origin and destination branches.
Some mockups showing what could be done in each page:
- The "Merge Request" button in the "Repository/Branches" page could change to "View Open Merge Requests" when detected:
- The "View Open Merge Requests" button could send you to the list of Merge Requests, if two new filters "Origin branch" and "Destination branch" were added:
- The "New Merge Request" page could add some text and a link to the Merge Request already open, when detected. And it could hide the rest of the page. Ie:
- The "Compare branches and continue" button in the "Change Branches" page could be changed to "View Open Merge Request", when detected:
Edited by 🤖 GitLab Bot 🤖




