def _cleanUpAllCommits(results, all_commits):
    """
    Helper function for _getAllCommitss(). Clean up commits and strip out cursor info.

    GIVEN:
      results (dict) -- initial query response with metadata
      all_commits (list) -- nested list of commits with comments and metadata

    RETURN:
      results (dict) -- cleaned up results
    """
    results["data"]["repository"]["defaultBranchRef"]["target"]["history"]["edges"] = all_commits
    results["data"]["repository"]["defaultBranchRef"]["target"]["history"].pop("pageInfo")
    return results