in ddm-rrm-gerrit-integration/src/main/java/com/epam/digital/data/platform/management/gerritintegration/service/GerritServiceImpl.java [353:371]
public void rebase(String changeId) {
if (changeId != null) {
String request = String.format("/changes/%s/rebase", changeId);
Gson gson = new Gson();
try {
gerritApi.restClient()
.postRequest(request, gson.toJson(new RebaseInput(), RebaseInput.class));
} catch (HttpStatusException ex) {
if (ex.getStatusCode() != HttpStatus.CONFLICT.value()) {
throw new GerritCommunicationException(
"Something went wrong while rebasing change on candidate with id " + changeId, ex);
}
log.info(ex.getMessage());
} catch (RestApiException ex) {
throw new GerritCommunicationException(
"Something went wrong while rebasing change on candidate with id " + changeId, ex);
}
}
}