in ddm-rrm-gerrit-integration/src/main/java/com/epam/digital/data/platform/management/gerritintegration/service/GerritServiceImpl.java [239:258]
public void submitChanges(String changeId) {
try {
gerritApi.changes().id(changeId).current().submit();
} catch (HttpStatusException ex) {
if (ex.getStatusCode() == HttpStatus.NOT_FOUND.value()) {
throw new GerritChangeNotFoundException("Could not found candidate with id " + changeId,
ex);
}
if (ex.getStatusCode() == HttpStatus.CONFLICT.value()) {
throw new GerritConflictException(
"Failed to submit 1 change due to the following problems:\nChange" + changeId +
". Project policy requires all submissions to be a fast-forward. Please rebase the change locally and upload again for review");
}
throw new GerritCommunicationException(
"Something went wrong wile submitting candidate with id " + changeId, ex);
} catch (RestApiException ex) {
throw new GerritCommunicationException(
"Something went wrong wile submitting candidate with id " + changeId, ex);
}
}