def get_comments(github_object):
    """Get a list of comments, whater the object is a PR, a commit or an issue.
    """
    try:
        return github_object.get_issue_comments()  # It's a PR
    except AttributeError:
        return github_object.get_comments()