def remove_hook(self, repo_id, name):
        """Remove repository hook."""
        ghrepo = self.api.repository_with_id(repo_id)
        if ghrepo:
            hooks = (h for h in ghrepo.hooks()
                     if h.config.get('url', '') == self.webhook_url)
            hook = next(hooks, None)
            if not hook or hook.delete():
                Repository.disable(user_id=self.user_id,
                                   github_id=repo_id,
                                   name=name)
                return True
        return False
Remove repository hook.