SomeFire commented on a change in pull request #27: IGNITE-9770 Add 'Re-run possible blockers' button
URL:
https://github.com/apache/ignite-teamcity-bot/pull/27#discussion_r223329630
##########
File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildsInfo.java
##########
@@ -0,0 +1,100 @@
+package org.apache.ignite.ci.observer;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.user.ICredentialsProv;
+
+public class BuildsInfo{
+ /** Finished. */
+ public static final String FINISHED = "finished";
+
+ /** Server id. */
+ public final String srvId;
+
+ /** Build type id. */
+ public final String buildTypeId;
+
+ /** Branch name. */
+ public final String branchName;
+
+ /** Prov. */
+ public final ICredentialsProv prov;
+
+ /** JIRA ticket full name. */
+ public final String ticket;
+
+ /** Finished builds. */
+ private final Map<Build, Boolean> finishedBuilds = new HashMap<>();
+
+ /**
+ * @param srvId Server id.
+ * @param prov Prov.
+ * @param ticket Ticket.
+ * @param builds Builds.
+ */
+ public BuildsInfo(String srvId, ICredentialsProv prov, String ticket, Build[] builds) {
+ this.srvId = srvId;
+ this.prov = prov;
+ this.ticket = ticket;
+ this.buildTypeId = builds.length > 1 ? "IgniteTests24Java8_RunAll" : builds[0].buildTypeId;
+ this.branchName = builds[0].branchName;
+
+ for (Build build : builds)
+ finishedBuilds.put(build, false);
+ }
+
+ /**
+ * @param teamcity Teamcity.
+ */
+ public boolean isFinished(IAnalyticsEnabledTeamcity teamcity) {
+ for (Map.Entry<Build, Boolean> entry : finishedBuilds.entrySet()){
+ if (!entry.getValue()){
Review comment:
Need space before opening 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:
[hidden email]
With regards,
Apache Git Services