def get_notification_params(**params):
    """ Get notification params from raw parameters. """
    create_link = params['create_link']
    result = dict(user=params['user'])
    result['project_link'] = create_link(params.get('repository_url'),
        params['project_name'])
    if params.get('server_name'):
        result['server_link'] = create_link(params.get('public_url'),
            params['server_name'])
    if params.get('commit'):
        result['commit_link'] = create_link(params.get('commit_url'),
            params['commit'])
    if params.get('branch'):
        result['branch_link'] = create_link(params.get('branch_url'),
            params['branch'])
    if params.get('script'):
        preformat = params.get('pre_format') or (lambda x: x)
        result['script'] = preformat(params['script'])
    return result
