Groovy web console

subscribe to the feed Subscribe
to this
site

testYaml

Published 3 months ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def walou = "WALOU"
def changedFiles = "Swagger/TEST.json\nSwagger/TEST.yaml\nSwagger/TEST.txt\n" 
def changedYamlFilesWithoutSuffix = changedFiles.split('\n').findAll { it.startsWith("Swagger/") && !it.endsWith(".yaml") }

if(changedYamlFilesWithoutSuffix){
    changedYamlFilesWithoutSuffix.each {
        println (it + " doesn't have .yaml suffix and must be changed")
    }
}
else println walou