Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace special characters with hyphen in featureName #396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccerrillo
Copy link

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"

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.
@aleksandr-m
Copy link
Owner

@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.

@ccerrillo
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants