Ignore Azure DevOps pull request merge commit message prefix when using cz_conventional_commits #909
Replies: 1 comment 30 replies
-
OptionsAzure configcheck if Azure Devops has a way to customize that prompt in order to remove the merge message. On github, if you squash a commit, it won't show the 'merge' message. Open a ticket and ask them to remove that. Create your own set of custom rulesPublish your own set of rules: https://commitizen-tools.github.io/commitizen/customization/#2-customize-through-customizing-a-class Try to customize the settingshttps://commitizen-tools.github.io/commitizen/customization/#2-customize-through-customizing-a-class You will have to modify a few I think, and the one you need the most is probably [tool.commitizen.customize]
bump_pattern = "^Merged PR \d+: ((BREAKING[\-\ ]CHANGE|\w+)(\(.+\))?!?):"
commit_parser = "^Merged PR \d+: ((?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?|\w+!):\s(?P<message>.*)?"
changelog_pattern = "^Merged PR \d+: ((BREAKING[\-\ ]CHANGE|\w+)(\(.+\))?!?):" |
Beta Was this translation helpful? Give feedback.
-
Description
We have automation using commitzen (cz_conventional_commits) on Azure DevOps but all the pull requests generate a merge commit message that starts with the prefix "Merged PR XXXX: "
I would like avoid to editing all the merge commit message, so would be great to have an option to customize commitzen and ignore this prefix for
cz bump
allowing commits message like this:Merged PR 1234: feat: add new language
Merged PR 8462: feat(lang): add Polish language
Merged PR 1346: fix(file.json): adjust boolean property
Merged PR 4732: refactor: rename files
Merged PR 7689: feat(api)!: send an email to the customer when a product is shipped
Possible Solution
No response
Additional context
There is the customization parameter
schema_pattern
but I couldn't meet my needs. Does anyone know if it is possible to do what I want using this field? Otherwise, this new feature would be good.Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions