def create_webhook()

in webhook-app/webhook_helper.py [0:0]


def create_webhook(owner, repository):
    gh = github_helper.get_client()
    repo = gh.repository(owner, repository)

    hook = repo.create_hook(
        name='web',
        config={
            'url': webhook_url(),
            'content_type': 'json',
            'secret': webhook_secret().decode('utf-8')},
        events=['*'])

    return hook