How to read all the files with a different extension (say .txt, .yml, etc) from the GitLab repository?
I'm using GitLabApi
and below is the code that I have done so far. This is basically fetching a single file.
public class GitLabRepoService {
@Value("${gitlab.accessToken}")
private String strAccessToken;
@Value("${gitlab.perfScript.projectId}")
private String strProjectId;
public RepositoryFile readFilesFromGitLabRepo(String hostUrl,String fileName,String strBranch) throws Exception {
GitLabApi gitLabApi = new GitLabApi(hostUrl, strAccessToken);
gitLabApi.setIgnoreCertificateErrors(true);
gitLabApi.getRepositoryFileApi().
return gitLabApi.getRepositoryFileApi().getFile(strProjectId, fileName, strBranch);
}
}