|
| 1 | + |
| 2 | +[tool.commitizen] |
| 3 | +version_files = ["pyproject.toml:version"] |
| 4 | +version = "2.8.28" |
| 5 | +tag_format = "v$version" |
| 6 | +name = "cz_customize" |
| 7 | + |
| 8 | +[tool.commitizen.customize] |
| 9 | +message_template = "{{prefix}}{% if scope %}({{scope}}){% endif %}: {{subject}}{% if body %}\n\n{{body}}{% endif %}{% if is_breaking_change %}\n\nBREAKING CHANGE: {{footer}}{% else %}\n\n{{footer}}{% endif %}" |
| 10 | + |
| 11 | +bump_pattern = "^(BREAKING[\\-\\ ]CHANGE|feat|fix|refactor|perf|ci|docs|style|test|chore|revert|build)(\\(.+\\))?(!)?" |
| 12 | +change_type_order = [ |
| 13 | + "BREAKING CHANGE", |
| 14 | + "Feat", |
| 15 | + "Fix", |
| 16 | + "Refactor", |
| 17 | + "Perf", |
| 18 | + "CI", |
| 19 | + "Docs", |
| 20 | + "Technical", |
| 21 | + "Tests", |
| 22 | +] |
| 23 | +bump_message = "bump: version $current_version → $new_version" |
| 24 | +schema = "<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n(BREAKING CHANGE: )<footer>" |
| 25 | +schema_pattern = "(?s)(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\\(\\S+\\))?!?:( [^\\n\\r]+)((\\n\\n.*)|(\\s*))?$" |
| 26 | +commit_parser = "^(?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE|ci|docs|style|test|chore|revert|build)(?:\\((?P<scope>[^()\\r\\n]*)\\)|\\()?(?P<breaking>!)?:\\s(?P<message>.*)?" |
| 27 | +version_parser = "(?P<version>([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?(\\w+)?)" |
| 28 | +changelog_pattern = "^(BREAKING[\\-\\ ]CHANGE|feat|fix|refactor|perf|ci|docs|style|test|chore|revert|build)(\\(.+\\))?(!)?" # same as bump_pattern |
| 29 | +[tool.commitizen.customize.bump_map] |
| 30 | +"^.+!$" = "MAJOR" |
| 31 | +"^BREAKING[\\-\\ ]CHANGE" = "MAJOR" |
| 32 | +"^feat" = "MINOR" |
| 33 | +"^fix" = "PATCH" |
| 34 | +"^refactor" = "PATCH" |
| 35 | +"^perf" = "PATCH" |
| 36 | +"^ci" = "PATCH" |
| 37 | +"^docs" = "PATCH" |
| 38 | +"^style" = "PATCH" |
| 39 | +"^test" = "PATCH" |
| 40 | +"^chore" = "PATCH" |
| 41 | +"^revert" = "PATCH" |
| 42 | +"^build" = "PATCH" |
| 43 | + |
| 44 | +[tool.commitizen.customize.change_type_map] |
| 45 | +"feat" = "Feat" |
| 46 | +"fix" = "Fix" |
| 47 | +"refactor" = "Refactor" |
| 48 | +"perf" = "Perf" |
| 49 | +"ci" = "CI" |
| 50 | +"docs" = "Docs" |
| 51 | +"style" = "Technical" |
| 52 | +"test" = "Tests" |
| 53 | +"chore" = "Technical" |
| 54 | +"revert" = "Fix" |
| 55 | +"build" = "Technical" |
| 56 | + |
| 57 | +[[tool.commitizen.customize.questions]] |
| 58 | +type = "list" |
| 59 | +name = "prefix" |
| 60 | +message = "Select the type of change you are committing" |
| 61 | +choices = [ |
| 62 | + { value = "fix", name = "fix: A bug fix. Correlates with PATCH in SemVer", key = "x" }, |
| 63 | + { value = "feat", name = "feat: A new feature. Correlates with MINOR in SemVer", key = "f" }, |
| 64 | + { value = "docs", name = "docs: Documentation only changes", key = "d" }, |
| 65 | + { value = "style", name = "style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", key = "s" }, |
| 66 | + { value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature", key = "r" }, |
| 67 | + { value = "perf", name = "perf: A code change that improves performance", key = "p" }, |
| 68 | + { value = "test", name = "test: Adding missing or correcting existing tests", key = "t" }, |
| 69 | + { value = "build", name = "build: Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)", key = "b" }, |
| 70 | + { value = "ci", name = "ci: Changes to our CI configuration files and scripts (example scopes: GitLabCI)", key = "c" }, |
| 71 | +] |
| 72 | + |
| 73 | +[[tool.commitizen.customize.questions]] |
| 74 | +type = "input" |
| 75 | +name = "scope" |
| 76 | +message = "What is the scope of this change? ((story number, class or file name): (press [enter] to skip)\n" |
| 77 | + |
| 78 | +[[tool.commitizen.customize.questions]] |
| 79 | +type = "input" |
| 80 | +name = "subject" |
| 81 | +message = "Write a short and imperative summary of the code changes: (lower case and no period)\n" |
| 82 | + |
| 83 | +[[tool.commitizen.customize.questions]] |
| 84 | +type = "input" |
| 85 | +name = "body" |
| 86 | +message = "Provide additional contextual information about the code changes: (press [enter] to skip)\n" |
| 87 | + |
| 88 | +[[tool.commitizen.customize.questions]] |
| 89 | +type = "confirm" |
| 90 | +message = "Is this a BREAKING CHANGE? Correlates with MAJOR in SemVer" |
| 91 | +name = "is_breaking_change" |
| 92 | +default = false |
| 93 | + |
| 94 | +[[tool.commitizen.customize.questions]] |
| 95 | +type = "input" |
| 96 | +name = "footer" |
| 97 | +message = "Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)\n" |
0 commit comments