Mark MR as merged regardless of errors when closing issues
We should mark the MR as merged as first thing on PostMergeService
as in practice it is already merged on the repository.
Happens that errors may happen when executing external services such as Issues::CloseService
, and we do not want a MR hanging as opened because of that. Suggested on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20026#note_84354831.
Additionally, we should monitor StuckMergeJobsWorker
. If it stop finding MRs hanging on locked
, that may be related.
This is part of https://gitlab.com/gitlab-org/gitlab-ce/issues/29123.