def add_hook_log(node, github, action, path, date, committer, include_urls=False,
                 sha=None, save=False):
    github_data = {
        'user': github.user,
        'repo': github.repo,
    }

    urls = {}

    if include_urls:
        # TODO: Move to helper function
        url = node.web_url_for('addon_view_or_download_file', path=path, provider=SHORT_NAME)

        urls = {
            'view': '{0}?ref={1}'.format(url, sha),
            'download': '{0}?action=download&ref={1}'.format(url, sha)
        }

    node.add_log(
        action=action,
        params={
            'project': node.parent_id,
            'node': node._id,
            'path': path,
            'github': github_data,
            'urls': urls,
        },
        auth=None,
        foreign_user=committer,
        log_date=date,
        save=save,
    )
webargs error handler that uses Flask-RESTful's abort function to return
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/github/views.py/add_hook_log--crossover with--dataset/ETHPy150Open sloria/webargs/examples/flaskrestful_example.py/handle_request_parsing_error