15

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

user9517254
  • 181
  • 1
  • 1
  • 3

2 Answers2

6

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

glen
  • 1,657
  • 19
  • 19
  • 1
    Clicking this button didn't do anything for me. Running Gitlab CE 11.3.1 The button did change in color from "Reopen merge request" to an orange "Close merge request" – Omkar Neogi Jan 17 '19 at 16:20
5

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.

azalea
  • 11,402
  • 3
  • 35
  • 46
Morty
  • 2,889
  • 2
  • 19
  • 28