[ 
https://issues.apache.org/jira/browse/IGNITE-9939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668718#comment-16668718
 ] 

ASF GitHub Bot commented on IGNITE-9939:
----------------------------------------

SomeFire commented on a change in pull request #40: IGNITE-9939 BuildObserver 
UNKNOWN build state handling added
URL: https://github.com/apache/ignite-teamcity-bot/pull/40#discussion_r229284966
 
 

 ##########
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
 ##########
 @@ -193,61 +216,87 @@ private String generateJiraComment(
 
                 Map<String, List<SuiteCurrentStatus>> fails = 
findFailures(server);
 
-                for (List<SuiteCurrentStatus> suites : fails.values()) {
-                    for (SuiteCurrentStatus suite : suites) {
-                        
res.append("{color:#d04437}").append(suite.name).append("{color}");
-                        res.append(" [[tests ").append(suite.failedTests);
+                fails.entrySet().forEach(e -> res.addAll(e.getValue()));
+            }
+        }
+
+        return res;
+    }
+
+    /** */
+    private String generateJiraComment(List<SuiteCurrentStatus> suites, String 
webUrl) {
+        StringBuilder res = new StringBuilder();
 
-                        if (suite.result != null && !suite.result.isEmpty())
-                            res.append(' ').append(suite.result);
+        for (SuiteCurrentStatus suite : suites) {
+            res.append("{color:#d04437}").append(suite.name).append("{color}");
+            res.append(" [[tests ").append(suite.failedTests);
 
-                        
res.append('|').append(suite.webToBuild).append("]]\\n");
+            if (suite.result != null && !suite.result.isEmpty())
+                res.append(' ').append(suite.result);
 
-                        for (TestFailure failure : suite.testFailures) {
-                            res.append("* ");
+            res.append('|').append(suite.webToBuild).append("]]\\n");
 
-                            if (failure.suiteName != null && failure.testName 
!= null)
-                                res.append(failure.suiteName).append(": 
").append(failure.testName);
-                            else
-                                res.append(failure.name);
+            for (TestFailure failure : suite.testFailures) {
+                res.append("* ");
 
-                            FailureSummary recent = 
failure.histBaseBranch.recent;
+                if (failure.suiteName != null && failure.testName != null)
+                    res.append(failure.suiteName).append(": 
").append(failure.testName);
+                else
 
 Review comment:
   Remove empty line before closing brace.

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


> [TC Bot] Add visa's cahing and monitoring
> -----------------------------------------
>
>                 Key: IGNITE-9939
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9939
>             Project: Ignite
>          Issue Type: Task
>            Reporter: PetrovMikhail
>            Assignee: PetrovMikhail
>            Priority: Minor
>
> Add visa cahing and monitoring. Handle situation within BuildObserver when 
> build status is "UNKNOWN"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to