Skip to content

Commit ec2f2bc

Browse files
committed
test(cz_customize): fix YAML test and docs configurations quotes
> commitizen.exceptions.InvalidConfigurationError: Failed to parse not_exist.yaml: while scanning a double-quoted scalar > found unknown escape character 's' Signed-off-by: Adrian DC <[email protected]>
1 parent 445c01f commit ec2f2bc

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Diff for: docs/customization.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ And the correspondent example for a yaml json file:
110110
commitizen:
111111
name: cz_customize
112112
customize:
113-
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
113+
message_template: '{{change_type}}:{% if show_message %} {{message}}{% endif %}'
114114
example: 'feature: this feature enable customize through config file'
115-
schema: "<type>: <body>"
116-
schema_pattern: "(feature|bug fix):(\\s.*)"
117-
bump_pattern: "^(break|new|fix|hotfix)"
118-
commit_parser: "^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?",
119-
changelog_pattern: "^(feature|bug fix)?(!)?",
115+
schema: '<type>: <body>'
116+
schema_pattern: '(feature|bug fix):(\\s.*)'
117+
bump_pattern: '^(break|new|fix|hotfix)'
118+
commit_parser: '^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?'
119+
changelog_pattern: '^(feature|bug fix)?(!)?'
120120
change_type_map:
121121
feature: Feat
122122
bug fix: Fix
@@ -125,7 +125,7 @@ commitizen:
125125
new: MINOR
126126
fix: PATCH
127127
hotfix: PATCH
128-
change_type_order: ["BREAKING CHANGE", "feat", "fix", "refactor", "perf"]
128+
change_type_order: ['BREAKING CHANGE', 'feat', 'fix', 'refactor', 'perf']
129129
info_path: cz_customize_info.txt
130130
info: This is customized info
131131
questions:

Diff for: tests/test_cz_customize.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@
105105
- commitizen/__version__.py
106106
- pyproject.toml
107107
customize:
108-
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
108+
message_template: '{{change_type}}:{% if show_message %} {{message}}{% endif %}'
109109
example: 'feature: this feature enables customization through a config file'
110-
schema: "<type>: <body>"
111-
schema_pattern: "(feature|bug fix):(\\s.*)"
112-
bump_pattern: "^(break|new|fix|hotfix)"
110+
schema: '<type>: <body>'
111+
schema_pattern: '(feature|bug fix):(\\s.*)'
112+
bump_pattern: '^(break|new|fix|hotfix)'
113113
bump_map:
114114
break: MAJOR
115115
new: MINOR
116116
fix: PATCH
117117
hotfix: PATCH
118-
change_type_order: ["perf", "BREAKING CHANGE", "feat", "fix", "refactor"]
118+
change_type_order: ['perf', 'BREAKING CHANGE', 'feat', 'fix', 'refactor']
119119
info: This is a customized cz.
120120
questions:
121121
- type: list

0 commit comments

Comments
 (0)