Groovy web console

subscribe to the feed Subscribe
to this
site

idp-regex-master-branch

Published 2 weeks ago by did
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def branchName = "feature/IDP-5417_master-version"
//def branchName = "master"

if (branchName =~ /master/) {
    System.out.println("master")
} else if (branchName =~ /feature*/) {
    System.out.println("feature")
} else if (branchName =~ /release*/) {
    System.out.println("release")
} else if (branchName =~ /hotfix*/) {
    System.out.println("hotfix")
}