[GitHub] asfgit closed pull request #13: Green table header for PRs without possible blockers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] asfgit closed pull request #13: Green table header for PRs without possible blockers

GitBox
asfgit closed pull request #13: Green table header for PRs without possible blockers
URL: https://github.com/apache/ignite-teamcity-bot/pull/13
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
index 59e64ec..2aeafc6 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
@@ -24,13 +24,13 @@
  */
 @SuppressWarnings("WeakerAccess") public class UpdateInfo {
     /** TeamCity auth token availability flag. */
-    public static int TEAMCITY_FLAG = 1;
+    public static final int TEAMCITY_FLAG = 1;
 
     /** GitHub auth token availability flag. */
-    public static int GITHUB_FLAG = 2;
+    public static final int GITHUB_FLAG = 2;
 
     /** JIRA auth token availability flag. */
-    public static int JIRA_FLAG = 2;
+    public static final int JIRA_FLAG = 4;
 
     /** Flags to use in javascript. */
     public Integer javaFlags = 0;
@@ -58,12 +58,12 @@ public UpdateInfo copyFrom(UpdateInfo info) {
      */
     public void setJavaFlags(IAnalyticsEnabledTeamcity teamcity) {
         if (teamcity.isTeamCityTokenAvailable())
-            javaFlags = javaFlags | TEAMCITY_FLAG;
+            javaFlags |= TEAMCITY_FLAG;
 
         if (teamcity.isGitTokenAvailable())
-            javaFlags = javaFlags | GITHUB_FLAG;
+            javaFlags |= GITHUB_FLAG;
 
         if (teamcity.isJiraTokenAvailable())
-            javaFlags = javaFlags | JIRA_FLAG;
+            javaFlags |= JIRA_FLAG;
     }
 }
diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
index dd01b11..67d5c18 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
@@ -211,14 +211,20 @@ function addBlockersData(server, settings) {
             blockers += showSuiteData(suite, settings);
     }
 
-    if (blockers !== "") {
+    if (blockers === "") {
+        blockers = "<tr bgcolor='#D6F7C1'><th colspan='3' class='table-title'>" +
+            "<b>Possible Blockers not found!</b></th>" +
+            "<th class='table-title'>Base Branch</th></tr>";
+    }
+    else {
         blockers = "<tr bgcolor='#F5F5FF'><th colspan='3' class='table-title'><b>Possible Blockers</b></th>" +
-            "<th  class='table-title'>Base Branch</th></tr>" +
-            blockers +
-            "<tr bgcolor='#F5F5FF'><th colspan='3' class='table-title'><b>All Failures</b></th>" +
-            "<th  class='table-title'>Base Branch</th></tr>";
+            "<th class='table-title'>Base Branch</th></tr>" +
+            blockers
     }
 
+    blockers += "<tr bgcolor='#F5F5FF'><th colspan='3' class='table-title'><b>All Failures</b></th>" +
+        "<th class='table-title'>Base Branch</th></tr>";
+
     return blockers;
 }
 


 

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services