def reactions_to_user_lists(reaction_list):
    """Convert list of reactions from GitHub API into list of usernames for upvote and downvote"""
    upvotes = []
    downvotes = []
    for r in reaction_list:
        if r["content"] not in ["+1", "-1"] or r["user"]["type"] != "User":
            continue

        username = r["user"]["login"]
        if r["content"] == "+1":
            upvotes.append(username)
        elif r["content"] == "-1":
            downvotes.append(username)
    upvotes.sort()
    downvotes.sort()
    return upvotes, downvotes