

def add_hook_log(node, github, action, path, date, committer, include_urls=False, sha=None, save=False):
    'Add log event for commit from webhook payload.\n\n    :param node: Node to add logs to\n    :param github: GitHub node settings record\n    :param path: Path to file\n    :param date: Date of commit\n    :param committer: Committer name\n    :param include_urls: Include URLs in `params`\n    :param sha: SHA of updated file\n    :param save: Save changes\n\n    '
    github_data = {
        'user': github.user,
        'repo': github.repo,
    }
    urls = {
        
    }
    if include_urls:
        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=date, 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)

dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/github/views.py add_hook_log/VarMisuse@120/320 `action`->`date`