This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects

Resolve "Relevance Ranking in Metadata"

Merged Philipp Gritsch requested to merge 439-relevance-ranking-in-metadata into development
Files
2
@@ -148,15 +148,20 @@ public class GitlabService {
RepositoryFile file;
try (GitLabApi gitLabApi = gitLabRepository.getGitLabApi(tokenProvider.getGitLabAccessInfo());) {
file =
gitLabApi
.getRepositoryFileApi()
.getFile(
Long.valueOf(exercise.getProject().getProject_id()),
exerciseId.extendPath(filePath),
exercise.getFile().getCommit_id()
);
return new ByteArrayInputStream(file.getDecodedContentAsBytes());
if (exercise.getFile().getCommit_id() != null) {
file =
gitLabApi
.getRepositoryFileApi()
.getFile(
Long.valueOf(exercise.getProject().getProject_id()),
exerciseId.extendPath(filePath),
exercise.getFile().getCommit_id()
);
return new ByteArrayInputStream(file.getDecodedContentAsBytes());
} else {
log.warn("commit_id must not be null for {}", exerciseId);
return null;
}
} catch (GitLabApiException e) {
log.warn(
"GitlabAPI Exception when looking for {} {} {} with message {}",