|
18 | 18 |
|
19 | 19 | bump_pattern = "^(break|new|fix|hotfix)" |
20 | 20 | bump_map = {"break" = "MAJOR", "new" = "MINOR", "fix" = "PATCH", "hotfix" = "PATCH"} |
| 21 | + bump_map_major_version_zero = {"break" = "MINOR", "new" = "MINOR", "fix" = "PATCH", "hotfix" = "PATCH"} |
21 | 22 | change_type_order = ["perf", "BREAKING CHANGE", "feat", "fix", "refactor"] |
22 | 23 | info = "This is a customized cz." |
23 | 24 |
|
|
62 | 63 | "fix": "PATCH", |
63 | 64 | "hotfix": "PATCH" |
64 | 65 | }, |
| 66 | + "bump_map_major_version_zero": { |
| 67 | + "break": "MINOR", |
| 68 | + "new": "MINOR", |
| 69 | + "fix": "PATCH", |
| 70 | + "hotfix": "PATCH" |
| 71 | + }, |
65 | 72 | "commit_parser": "^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?", |
66 | 73 | "changelog_pattern": "^(feature|bug fix)?(!)?", |
67 | 74 | "change_type_map": {"feature": "Feat", "bug fix": "Fix"}, |
|
117 | 124 | new: MINOR |
118 | 125 | fix: PATCH |
119 | 126 | hotfix: PATCH |
| 127 | + bump_map_major_version_zero: |
| 128 | + break: MINOR |
| 129 | + new: MINOR |
| 130 | + fix: PATCH |
| 131 | + hotfix: PATCH |
120 | 132 | change_type_order: ["perf", "BREAKING CHANGE", "feat", "fix", "refactor"] |
121 | 133 | info: This is a customized cz. |
122 | 134 | questions: |
@@ -654,11 +666,14 @@ def test_message_without_config(empty_config): |
654 | 666 | "scope": "users", |
655 | 667 | "subject": "email pattern corrected", |
656 | 668 | "is_breaking_change": False, |
657 | | - "body": "", |
658 | | - "footer": "", |
| 669 | + "body": "complete content", |
| 670 | + "footer": "closes #24", |
659 | 671 | } |
660 | 672 | message = conventional_commits.message(answers) |
661 | | - assert message == "fix(users): email pattern corrected" |
| 673 | + assert ( |
| 674 | + message |
| 675 | + == "fix(users): email pattern corrected\n\ncomplete content\n\ncloses #24" |
| 676 | + ) |
662 | 677 | assert cz.message(answers) == message |
663 | 678 |
|
664 | 679 |
|
|
0 commit comments