in ddm-rrm-gerrit-integration/src/main/java/com/epam/digital/data/platform/management/gerritintegration/service/GerritServiceImpl.java [76:92]
public List<ChangeInfoShortDto> getMRList() {
var query = String.format("project:%s+status:open+owner:%s",
gerritPropertiesConfig.getRepository(), gerritPropertiesConfig.getUser());
try {
return gerritApi.changes().query(query).get().stream()
.map(gerritMapper::toChangeInfoShortDto)
.collect(Collectors.toList());
} catch (HttpStatusException ex) {
if (ex.getStatusCode() == HttpStatus.NOT_FOUND.value()) {
throw new GerritChangeNotFoundException("Could not found candidates", ex);
} else {
throw new GerritCommunicationException("Something went wrong wile getting candidates", ex);
}
} catch (RestApiException ex) {
throw new GerritCommunicationException("Something went wrong wile getting candidates", ex);
}
}