Closed prafullazee closed 1 year ago
You need to DOUBLE escape your forward slashes, because what's happening is that the string is being escaped before being passed to preg_match(), so what reaches preg_match() is actually an invalid regex pattern. I just finished dealing with this and came here to see if anyone else had had the problem.
git_branch_name:
whitelist:
# allowed branch names: 'feature/JIRA-1234', 'bugfix/JIRA-1234', 'hotfix/JIRA-1234', 'hotfix/v1.0.1', 'release/v1.1.10' etc
- "/(hotfix|bugfix|feature)\\/([JIRA]){4}-([0-9]+){4}$/"
- "/(hotfix|release)\\/([v])([0-9]+){1,2}.([0-9]){1,2}.([0-9]){1,2}$/"
- "main"
@techdaddies-kevin awesome, thank you so much.
1.5.1
My configuration
Steps to reproduce:
Result:
Here is the regex test: https://regex101.com/r/zlHJL6/1 which is passing the branch names.