code: def enable(cls, user_id, github_id, name, hook):
          
          try:
              repo = cls.get(user_id, github_id=github_id, name=name)
          except NoResultFound:
              repo = cls.create(user_id=user_id, github_id=github_id, name=name)
          repo.hook = hook
          repo.user_id = user_id
          return repo
docs: Enable webhooks for a repository.
  
          If the repository does not exist it will create one.
  
          :param user_id: User identifier.
          :param repo_id: GitHub repository identifier.
          :param name: Fully qualified name of the repository.
          :param hook: GitHub hook identifier.