ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-9939) [TC Bot] Add visa's cahing and monitoring
Date Tue, 06 Nov 2018 13:16:01 GMT

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

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

SomeFire commented on a change in pull request #40: IGNITE-9939 [Tc Bot] Add visas caсhing
and monitoring
URL: https://github.com/apache/ignite-teamcity-bot/pull/40#discussion_r231103961
 
 

 ##########
 File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/Visa.java
 ##########
 @@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model;
+
+import org.apache.ignite.ci.jira.IJiraIntegration;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ *
+ */
+public class Visa {
+    /** */
+    public static final String EMPTY_VISA_STATUS = "emptyVisa";
+
+    /** */
+    public final String status;
+
+    /** */
+    @Nullable public final JiraCommentResponse jiraCommentRes;
+
+    /** */
+    public final int blockers;
+
+    /** */
+    public static Visa emptyVisa() {
+        return new Visa(EMPTY_VISA_STATUS);
+    }
+
+    /** */
+    public Visa(String status) {
+        this.status = status;
+        this.jiraCommentRes = null;
+        this.blockers = 0;
+    }
+
+    /** */
+    public Visa(String status, JiraCommentResponse res, Integer blockers) {
+        this.status = status;
+        this.jiraCommentRes = res;
+        this.blockers = blockers;
+    }
+
+    /** */
+    @Nullable public JiraCommentResponse getJiraCommentResponse() {
+        return jiraCommentRes;
+    }
+
+    /** */
+    @Nullable public int getBlockers() {
+        return blockers;
+    }
+
+    /** */
+    public boolean isSuccess() {
+        return IJiraIntegration.JIRA_COMMENTED.equals(status)
+            && jiraCommentRes != null;
+    }
+
+    /** */
+    public boolean isEmpty() {
+        return Visa.EMPTY_VISA_STATUS.equals(status);
 
 Review comment:
   Redundant class call.

----------------------------------------------------------------
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:
users@infra.apache.org


> [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)

Mime
View raw message