@cli.register_custom_action('<STR_LIT>', tuple(),<EOL>('<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'))<EOL><INDENT>@exc.on_http_error(exc.GitlabMRClosedError)<EOL>def merge(self, merge_commit_message=None,<EOL>should_remove_source_branch=False,<EOL>merge_when_pipeline_succeeds=False,<EOL>**kwargs):<DEDENT>
path = '<STR_LIT>' % (self.manager.path, self.get_id())<EOL>data = {}<EOL>if merge_commit_message:<EOL><INDENT>data['<STR_LIT>'] = merge_commit_message<EOL><DEDENT>if should_remove_source_branch:<EOL><INDENT>data['<STR_LIT>'] = True<EOL><DEDENT>if merge_when_pipeline_succeeds:<EOL><INDENT>data['<STR_LIT>'] = True<EOL><DEDENT>server_data = self.manager.gitlab.http_put(path, post_data=data,<EOL>**kwargs)<EOL>self._update_attrs(server_data)<EOL>
Accept the merge request.

        Args:
            merge_commit_message (bool): Commit message
            should_remove_source_branch (bool): If True, removes the source
                                                branch
            merge_when_pipeline_succeeds (bool): Wait for the build to succeed,
                                                 then merge
            **kwargs: Extra options to send to the server (e.g. sudo)

        Raises:
            GitlabAuthenticationError: If authentication is not correct
            GitlabMRClosedError: If the merge failed