Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reopen merge request in gitlab

Tags:

gitlab

Is there a way to reopen a merge request within Gitlab once it's been merged like there is with an issue?

In this example a merge request was merged before a code review and has been reverted, but it would be great to reopen the original merge request to keep the original history/discussions

like image 534
user9517254 Avatar asked Mar 19 '18 14:03

user9517254


People also ask

How do you revert back merge request in GitLab?

After the merge request has been merged, use the Revert button to revert the changes introduced by that merge request. After you select that button, a modal appears where you can choose to revert the changes directly into the selected branch or you can opt to create a new merge request with the revert changes.

What happens when you close a merge request in GitLab?

In Gitlab, the merged status means the relevant commits have been merged and no action is needed. A closed merge request is one that has been put aside or considered irrelevant. It is therefore not merged into the code base.


2 Answers

There's Reopen merge request button in Gitlab (Checked with 10.3.4-ce, but appeared earlier). However it does absolutely nothing when pressed, even with commits added to the branch the merge request is tied with.

reopen button

like image 171
glen Avatar answered Nov 03 '22 19:11

glen


This is currently not possible. There is a feature request and someone already started working on it, but that work has stalled.

Currently the only option I see is to open a new merge request and link the old one. Probably not what you want, but easy to do, and at least the two MRs are linked.

I also looked at the API, whether it is possible to duplicate the old MR. While the API does allow you to add discussions, this is very limited. Especially as it is currently not possible to add discussions to a specific file and line number. It is not even possible to extract that information via the API.

Thus the only option to accomplish "reopening" or "duplicating" a merge request is to mess with the database or work on the merge request.

like image 43
Morty Avatar answered Nov 03 '22 20:11

Morty