code: private boolean isRateLimitReached(ResponseEntity<String> response) {
          HttpHeaders header = response.getHeaders();
          List<String> limit = header.get("X-RateLimit-Remaining");
          boolean rateLimitReached =  CollectionUtils.isEmpty(limit) ? false : Integer.valueOf(limit.get(0)) < settings.getRateLimitThreshold();
          if (rateLimitReached) {
              LOG.error("Github rate limit reached. Threshold =" + settings.getRateLimitThreshold() + ". Current remaining ="+Integer.valueOf(limit.get(0)));
          }
          return rateLimitReached;
      }
docs: Checks rate limit
  @param response
  @return boolean