Improve behaviour of issues related to merge requests when the MR is merged
Description
The current behaviour today is that when a merge request is accepted, if it is related with an issue (with the usual naming convention), the issue is only closed when the merge request is merged into the default branch of the project. This is good for most use cases but there are lots of workflows with this might not translate properly.
For instance, I am working on a project to automatically manage scientific publications using GitLab's CI (best use case in science for CI I have thought of :)) and for this to work I developed our own package to check the health of a scientific LaTeX document. How we maintain this package is in our own GitLab project and every time a version goes into master it goes into production, i.e. a docker image is built and ready to be used for al CI pipelines in the papers/documents in the system.
This means that the workflow is not always: merge into master -> Close the issue, but rather merge into the next release branch and the issue is closed when the final merge is done into master (our default). The workflow can get more complicated since sometimes a merge request is accepted but it is not yet ready to go into production and still have some steps to go through. The current behaviour might be lacking in some respects and I imagine that if this happen in this small project more complicated workflows can be found where it won't fit all needs.
Proposal
What I would propose is to include extra quick actions which will trigger some behavior in the related issue if there is one. In this way a quick action like this:
/related_issue_label ~Merged
will apply a label to the related issue which can also change how an issue looks in a board. Lets say a feature is done and you want a different to take over, applying labels would be a very quick way of moving an issue across boards. More quick actions might be beneficial as well.
I am not sure if quick actions would be the best way or if it would be better to use a regexp as it is done with the way issues are closed.
Just changing which branch a merge should go to close an issue might not be optimal as well since sometimes the issue shouldn't be closed until passing different stages.