@@ -3,7 +3,7 @@ We have two different ways to do so.
3
3
4
4
## 1. Customize in configuration file
5
5
6
- ** This is only supported when configuring through ` toml ` (e.g., ` pyproject.toml ` , ` .cz ` , and ` .cz.toml ` )**
6
+ ** This is only supported when configuring through ` toml ` or ` json ` (e.g., ` pyproject.toml ` , ` .cz.toml ` , ` .cz.toml ` , ` .cz.json ` , and ` cz.json ` )**
7
7
8
8
The basic steps are:
9
9
@@ -46,6 +46,58 @@ name = "show_message"
46
46
message = " Do you want to add body message in commit?"
47
47
```
48
48
49
+ The equivalent example for a json config file:
50
+
51
+ ``` json
52
+ {
53
+ "commitizen" : {
54
+ "name" : " cz_customize" ,
55
+ "customize" : {
56
+ "message_template" : " {{change_type}}:{% if show_message %} {{message}}{% endif %}" ,
57
+ "example" : " feature: this feature enable customize through config file" ,
58
+ "schema" : " <type>: <body>" ,
59
+ "schema_pattern" : " (feature|bug fix):(\\ s.*)" ,
60
+ "bump_pattern" : " ^(break|new|fix|hotfix)" ,
61
+ "bump_map" : {
62
+ "break" : " MAJOR" ,
63
+ "new" : " MINOR" ,
64
+ "fix" : " PATCH" ,
65
+ "hotfix" : " PATCH"
66
+ },
67
+ "info_path" : " cz_customize_info.txt" ,
68
+ "info" : " This is customized info" ,
69
+ "questions" : [
70
+ {
71
+ "type" : " list" ,
72
+ "name" : " change_type" ,
73
+ "choices" : [
74
+ {
75
+ "value" : " feature" ,
76
+ "name" : " feature: A new feature."
77
+ },
78
+ {
79
+ "value" : " bug fix" ,
80
+ "name" : " bug fix: A bug fix."
81
+ }
82
+ ],
83
+ "message" : " Select the type of change you are committing"
84
+ },
85
+ {
86
+ "type" : " input" ,
87
+ "name" : " message" ,
88
+ "message" : " Body."
89
+ },
90
+ {
91
+ "type" : " confirm" ,
92
+ "name" : " show_message" ,
93
+ "message" : " Do you want to add body message in commit?"
94
+ }
95
+ ]
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
49
101
### Customize configuration
50
102
51
103
| Parameter | Type | Default | Description |
0 commit comments