SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218096565
 
 

 ##########
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityHelper.java
 ##########
 @@ -354,18 +357,39 @@ public String basicAuthToken() {
     private List<BuildRef> getBuildHistory(@Nullable String buildTypeId,
         @Nullable String branchName,
         boolean dfltFilter,
-        @Nullable String state) {
+        @Nullable String state){
+
+        return getBuildHistory(buildTypeId, branchName, dfltFilter, state, 
null, null);
+    }
+
+    private List<BuildRef> getBuildHistory(@Nullable String buildTypeId,
+        @Nullable String branchName,
+        boolean dfltFilter,
+        @Nullable String state,
+        @Nullable Date sinceDate,
+        @Nullable Date untilDate) {
         String btFilter = isNullOrEmpty(buildTypeId) ? "" : ",buildType:" + 
buildTypeId + "";
         String stateFilter = isNullOrEmpty(state) ? "" : (",state:" + state);
-        String brachFilter = isNullOrEmpty(branchName) ? "" :",branch:" + 
branchName;
+        String branchFilter = isNullOrEmpty(branchName) ? "" :",branch:" + 
branchName;
+        String sinceDateFilter = sinceDate == null ? "" : ",sinceDate:" + 
getDateYyyyMmDdTHhMmSsZ(sinceDate);
+        String untilDateFilter = untilDate == null ? "" : ",untilDate:" + 
getDateYyyyMmDdTHhMmSsZ(untilDate);
 
         return sendGetXmlParseJaxb(host + "app/rest/latest/builds"
             + "?locator="
             + "defaultFilter:" + dfltFilter
             + btFilter
             + stateFilter
-            + brachFilter
-            + ",count:1000", Builds.class).getBuildsNonNull();
+            + branchFilter
+            + ",count:" + DEFAULT_BUILDS_COUNT
+            + sinceDateFilter
+            + untilDateFilter, Builds.class).getBuildsNonNull();
+    }
+
+    public String getDateYyyyMmDdTHhMmSsZ(Date date){
+
 
 Review comment:
   Redundant blank line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to