gitflow-maven-plugin
gitflow-maven-plugin copied to clipboard
Replace special characters with hyphen in featureName
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 Why this is needed? Validation seems like better place for that. And there is featureNamePattern
parameter which allows to enforce naming of the feature.
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.