def _find_name_from_blame()

in testinggame/__init__.py [0:0]


def _find_name_from_blame(blame_line):
    """
    Finds the name of the committer of code given a blame line from git

    Args:
        blame_line: A string from the git output of the blame for a file.
    Returns:
        The username as a string of the user to blame
    """
    blame_info = blame_line[blame_line.find('(')+1:]
    blame_info = blame_info[:blame_info.find(')')]
    blame_components = blame_info.split()
    name_components = blame_components[:len(blame_components)-4]
    return ' '.join(name_components)