@cli.register_custom_action('<STR_LIT>', tuple(), ('<STR_LIT>'))<EOL><INDENT>@exc.on_http_error(exc.GitlabMRApprovalError)<EOL>def approve(self, sha=None, **kwargs):<DEDENT>
path = '<STR_LIT>' % (self.manager.path, self.get_id())<EOL>data = {}<EOL>if sha:<EOL><INDENT>data['<STR_LIT>'] = sha<EOL><DEDENT>server_data = self.manager.gitlab.http_post(path, post_data=data,<EOL>**kwargs)<EOL>self._update_attrs(server_data)<EOL>
Approve the merge request.

        Args:
            sha (str): Head SHA of MR
            **kwargs: Extra options to send to the server (e.g. sudo)

        Raises:
            GitlabAuthenticationError: If authentication is not correct
            GitlabMRApprovalError: If the approval failed