fun isSupportedProtocol()

in src/main/kotlin/org/jetbrains/teamcity/github/Util.kt [68:82]


        fun isSupportedProtocol(candidate: String): Boolean {
            if (candidate in setOf("git@", ""))
                return true;
            val username = candidate.substringAfter("://")
            if (username !in setOf("git@", ""))
                return false;
            val protocol = candidate.substringBefore("://")
            when (protocol.lowercase()) {
                "https" -> return true
                "http" -> return true
                "ssh" -> return true
                "git" -> return true
                else -> return false
            }
        }