MergeRequests API option to mark merge request as merged
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=16701) </details> <!--IssueSummary end--> ### Why A customer wanted to use the API to mark an MR as merged because the change was already merged by and external tool. ### What `PUT /projects/:id/merge_requests/:merge_request_id` to accept `state_event` option `mark_as_merged`. This could either be passed directly to the model or wrapped in a service to trigger any actions needed from `PostMergeService`. The model already has the following: ```ruby event :mark_as_merged do transition [:reopened, :opened, :locked] => :merged end ``` ### Links / references - https://gitlab.zendesk.com/agent/tickets/52552 - https://gitlab.com/gitlab-org/gitlab-ce/issues/25566
issue