SomeFire commented on a change in pull request #39: IGNITE-9901 Persistent 
queue for visas added
URL: https://github.com/apache/ignite-teamcity-bot/pull/39#discussion_r227300712
 
 

 ##########
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/ObserverTask.java
 ##########
 @@ -75,18 +93,23 @@ protected String runObserverTask() {
         int notFinishedBuilds = 0;
         Set<String> ticketsNotified = new HashSet<>();
 
+        Queue<BuildsInfo> builds = buildsQueue();
+
+        if (!tcHelper.isServerAuthorized())
+            return "Server authorization required.";
+
         for (BuildsInfo info : builds) {
             checkedBuilds += info.buildsCount();
 
-            IAnalyticsEnabledTeamcity teamcity = 
srvProvider.server(info.srvId, info.prov);
+            IAnalyticsEnabledTeamcity teamcity = tcHelper.server(info.srvId, 
tcHelper.getServerAuthorizerCreds());
 
             if (!info.isFinished(teamcity)) {
                 notFinishedBuilds += info.buildsCount() - 
info.finishedBuildsCount();
 
                 continue;
             }
 
-            String jiraRes = jiraIntegration.notifyJira(info.srvId, info.prov, 
info.buildTypeId,
+            String jiraRes = jiraIntegration.notifyJira(info.srvId, 
tcHelper.getServerAuthorizerCreds(), info.buildTypeId,
 
 Review comment:
   Extract `tcHelper.getServerAuthorizerCreds()` to variable `creds`.

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