public List getClosedMrIds()

in ddm-rrm-gerrit-integration/src/main/java/com/epam/digital/data/platform/management/gerritintegration/service/GerritServiceImpl.java [123:140]


  public List<String> getClosedMrIds() {
    String query = String.format("project:%s+status:closed+owner:%s",
        gerritPropertiesConfig.getRepository(), gerritPropertiesConfig.getUser());
    try {
      return gerritApi.changes().query(query).get().stream()
          .map(change -> String.valueOf(change._number)).collect(Collectors.toList());
    } catch (HttpStatusException ex) {
      if (ex.getStatusCode() == HttpStatus.NOT_FOUND.value()) {
        throw new GerritChangeNotFoundException("Could not found any closed candidate", ex);
      } else {
        throw new GerritCommunicationException(
            "Something went wrong wile getting closed candidates", ex);
      }
    } catch (RestApiException ex) {
      throw new GerritCommunicationException(
          "Something went wrong wile getting closed candidates", ex);
    }
  }