def _get_files_changed(repo_owner, repo, sha_fail, sha_pass, gh_wrapper):
    """
    repo_owner: Name of repo owner on GitHub
    repo: Name of repo on GitHub
    sha_fail: SHA of failing commit from the artifact
    sha_pass: SHA of passing commit from the artifact
    gh_wrapper: GitHub wrapper object

    Gets the files that were changed in the GitHub diff of the failing and passing commit

    :return: List of files that were changed in the GitHub diff
    """

    url = 'https://api.github.com/repos/{}/{}/compare/{}...{}'.format(repo_owner, repo, sha_fail, sha_pass)

    # Try to make github api request
    response, response_json = gh_wrapper.get(url)

    if response is None or response_json is None:
        return None

    # Create list of files that were changed
    files_changed = [f['filename'] for f in response_json['files']]
    pruned_files_changed = []
    
    # Prune files that are not Java files
    for file in files_changed:
        ext = file.split('.')[len(file.split('.'))-1].strip()
        if ext != 'java':
            continue
        pruned_files_changed.append(file)

    return pruned_files_changed