Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GItlab - close multiple issue with a single merge request

I was working on an issue linked to a gitlab merge-request that I completed but I haven't been able to do it yet (I have to wait for some colleague to get free to review).

Now while I wait I should start working on a new issue but, to develop the functionality of this second issue, I need the files committed in the first issue.

So I decided to continue working on the same merge request and then review both at the same time.

I am sure there is a way to mark on gitlab that that merge request closes both issues but I don't remember how to do it and I have some problem finding such a specific operation on the gitlab documentation!

example of a merge-request closing 2 issues:

enter image description here

like image 896
Lorenzo Piersante Avatar asked Aug 07 '26 11:08

Lorenzo Piersante


1 Answers

The answer of Jakob Liskow in the comments is correct.

Here, the extended version (according to GitLab docs). When using GitLab merge requests:

If a commit message or merge request description contains text matching the defined pattern, all issues referenced in the matched text are closed when either:

The commit is pushed to a project’s default branch.
The commit or merge request is merged into the default branch. 

For example, if you include Closes #4, #6, Related to #5 in a merge request description:

Issues #4 and #6 are closed automatically when the MR is merged.
Issue #5 is marked as a related issue, but it’s not closed automatically. 

Alternatively, when you create a merge request from an issue, it inherits the issue’s milestone and labels.

For performance reasons, automatic issue closing is disabled for the very first push from an existing repository.

like image 86
idichekop Avatar answered Aug 10 '26 01:08

idichekop



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!