gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

GitLabApi.getRepositoryFileApi.getOptionalFileInfo returns empty even though file is there on gitlab

Open sandeepshete6294 opened this issue 3 years ago • 0 comments

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?

sandeepshete6294 avatar Jun 08 '22 13:06 sandeepshete6294