public static boolean isValidBranchName ( String branch , String prefix ) throws Exception { if ( StringUtils . isNotBlank ( prefix ) && StringUtils . isNotBlank ( branch ) ) { if ( StringUtils . startsWithIgnoreCase ( branch , prefix + "-" ) ) { return true ; } else { System . err . println ( "Branch name must start with prefix \"" + prefix + "-\"." ) ; } } else { return true ; } return false ; }
Validates the branch name that will be sent to the given prefix .