Skip to content

Commit 1e1405a

Browse files
committed
docs(docs): add instructions on how to define yaml config files
314
1 parent c7a6d92 commit 1e1405a

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

docs/config.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ style = [
3030

3131
## .cz.json or cz.json
3232

33-
JSON may be a more commong configuration format for non-python projects, so Commitizen supports JSON config files, now.
33+
JSON might be a more common configuration format for non-python projects, so Commitizen supports JSON config files, now.
3434

3535
```json
3636
{
@@ -87,6 +87,39 @@ JSON may be a more commong configuration format for non-python projects, so Comm
8787
}
8888
```
8989

90+
## .cz.yaml or cz.yaml
91+
YAML is another format for **non-python** proyects as well, supported by Commitizen:
92+
93+
```yaml
94+
commitizen:
95+
name: cz_conventional_commits
96+
version: 0.1.0
97+
version_files:
98+
- src/__version__.py
99+
- pyproject.toml:version
100+
style:
101+
- - qmark
102+
- fg:#ff9d00 bold
103+
- - question
104+
- bold
105+
- - answer
106+
- fg:#ff9d00 bold
107+
- - pointer
108+
- fg:#ff9d00 bold
109+
- - highlighted
110+
- fg:#ff9d00 bold
111+
- - selected
112+
- fg:#cc5454
113+
- - separator
114+
- fg:#cc5454
115+
- - instruction
116+
- ''
117+
- - text
118+
- ''
119+
- - disabled
120+
- fg:#858585 italic
121+
```
122+
90123
## Settings
91124
92125
| Variable | Type | Default | Description |

docs/customization.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,41 @@ The equivalent example for a json config file:
9898
}
9999
```
100100

101+
And the correspondent example for a yaml json file:
102+
103+
```yaml
104+
commitizen:
105+
name: cz_customize
106+
customize:
107+
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
108+
example: 'feature: this feature enable customize through config file'
109+
schema: "<type>: <body>"
110+
schema_pattern: "(feature|bug fix):(\\s.*)"
111+
bump_pattern: "^(break|new|fix|hotfix)"
112+
bump_map:
113+
break: MAJOR
114+
new: MINOR
115+
fix: PATCH
116+
hotfix: PATCH
117+
info_path: cz_customize_info.txt
118+
info: This is customized info
119+
questions:
120+
- type: list
121+
name: change_type
122+
choices:
123+
- value: feature
124+
name: 'feature: A new feature.'
125+
- value: bug fix
126+
name: 'bug fix: A bug fix.'
127+
message: Select the type of change you are committing
128+
- type: input
129+
name: message
130+
message: Body.
131+
- type: confirm
132+
name: show_message
133+
message: Do you want to add body message in commit?
134+
```
135+
101136
### Customize configuration
102137
103138
| Parameter | Type | Default | Description |

0 commit comments

Comments
 (0)