def process_hook(func, args):
    credentials = None
    if args.login_user and args.login_pass:
        credentials = {
            'GITHUB_USER': args.login_user,
            'GITHUB_PASSWORD': args.login_pass
        }

    with app.app_context():
        if credentials:
            credentials['GITHUB_URL'] = app.config['GITHUB_URL']
            repo = github.get_repository(
                credentials,
                args.user,
                args.repo)
        else:
            repo = github.get_repository(
                app.config,
                args.user,
                args.repo)
        endpoint = url_for('start_review', _external=True)
    func(repo, endpoint)
Convert humanized diffs to a list for usage in template
dataset/ETHPy150Open markstory/lint-review/lintreview/cli.py/process_hook--crossover with--dataset/ETHPy150Open kapsiry/sikteeri/membership/utils.py/change_message_to_list