gitlab4j-api
gitlab4j-api copied to clipboard
GitLabApi.getRepositoryFileApi.getOptionalFileInfo returns empty even though file is there on gitlab
I am using gitlab4j api v4.14.28 and Gitlab version 12.0, java 11
I am trying to get file information from gitlab using below method
GitLabApi gitLabApi = new GitLabApi(SERVER_URL, ACCESS_TOKEN);
Optional<RepositoryFile> fileInfo = gitLabApi.getRepositoryFileApi().getOptionalFileInfo(gitlab_project_id, fileLoc, branchName);
but it is not returning the file info even if the file is present on gitlab, it's returning empty
Can you please help, let me know where am I going wrong?