Fix warnings spam

Task: PRODX-54485

Change-Id: Ic4868cc29435e4cd1533e737ce8eb8ca8fa27c13
diff --git a/src/com/mirantis/mcp/SlackNotification.groovy b/src/com/mirantis/mcp/SlackNotification.groovy
index 8aa0cfe..7f8ff75 100644
--- a/src/com/mirantis/mcp/SlackNotification.groovy
+++ b/src/com/mirantis/mcp/SlackNotification.groovy
@@ -42,8 +42,10 @@
 
 
     def common = new com.mirantis.mk.Common()
-    cred = common.getCredentialsById(credentialsId)
-    hook_url_parsed = cred.getSecret().toString()
+    def cred = common.getCredentialsById(credentialsId)
+    def hook_url_parsed = cred.getSecret().toString()
+    String colorCode
+    String colorName
 
     switch(buildStatusParam.toLowerCase()) {
         case "success":
@@ -63,7 +65,7 @@
             colorName = "grey"
     }
 
-    queryString = 'payload={' +
+    String queryString = 'payload={' +
             "'text':'${buildStatusParam.toUpperCase()}: Job <${buildUrlParam}|${jobNameParam} [${buildNumberParam}]>\\n ${description}', " +
             "'color':'${colorCode}'," +
             "'pretext': '', " +
@@ -71,7 +73,6 @@
             "'channel': '${channel}', " +
             '}'
     sendPostRequest(hook_url_parsed, queryString)
-
 }
 
 /*