gitflow-maven-plugin icon indicating copy to clipboard operation
gitflow-maven-plugin copied to clipboard

Replace special characters with hyphen in featureName

Open ccerrillo opened this issue 1 year ago • 2 comments

In preparation for future Maven updates that may not support certain characters, this commit updates the featureVersion method to replace especial characters, including '/', ':', '"', '<', '>', '|', '?', '*', and '', with a hyphen ('-') in the featureName parameter. Additionally, it ensures that multiple hyphens are not consecutively present in the result.

This allows branch names like "feature/2023-09-28/my-awesome-feature"

ccerrillo avatar Sep 28 '23 09:09 ccerrillo

@ccerrillo Why this is needed? Validation seems like better place for that. And there is featureNamePattern parameter which allows to enforce naming of the feature.

aleksandr-m avatar Nov 23 '23 18:11 aleksandr-m

Some Git clients allow these types of branch names and can then display them in a tree-like structure. Personally, I find this very useful. The problem arose because if I did it this way, the name was transferred directly to the POM. My goal is not to restrict it but to allow it.

ccerrillo avatar Nov 26 '23 21:11 ccerrillo