-
-
Notifications
You must be signed in to change notification settings - Fork 301
Commit 5a661cf
feat(commit): implement questions 'filter' support with evaluations
Supported APIs: Common Python, commitizen.cz.utils.* functions
Example YAML configurations:
---
commitizen:
name: cz_customize
customize:
questions:
- ...
- type: input
name: scope
message: 'Scope of the change :'
filter: 'lambda text: commitizen.cz.utils.required_validator(text, msg="! Error: Scope is required")'
default: ''
- type: input
name: subject
message: 'Title of the commit (starting in lower case and without period) :'
filter: 'lambda text: commitizen.cz.utils.required_validator(text.strip(".").strip(), msg="! Error: Title is required")'
default: ''
- type: input
name: body
message: 'Additional contextual message (Empty to skip) :'
default: 'Issue: #...'
filter: 'commitizen.cz.utils.multiple_line_breaker'
---
Signed-off-by: Adrian DC <radian.dc@gmail.com>1 parent ef9dc84 commit 5a661cf
File tree
3 files changed
+57
-4
lines changed- commitizen/commands
- docs
- tests
3 files changed
+57
-4
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 | - | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
12 | 15 |
| |
13 | 16 |
| |
14 | 17 |
| |
| |||
49 | 52 |
| |
50 | 53 |
| |
51 | 54 |
| |
55 | + | ||
52 | 56 |
| |
53 | 57 |
| |
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
54 | 71 |
| |
55 | 72 |
| |
56 | 73 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 | - | ||
178 | + | ||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 | + | ||
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| |||
84 | 85 |
| |
85 | 86 |
| |
86 | 87 |
| |
87 | - | ||
88 | + | ||
89 | + | ||
88 | 90 |
| |
89 | 91 |
| |
90 | 92 |
| |
| |||
134 | 136 |
| |
135 | 137 |
| |
136 | 138 |
| |
139 | + | ||
137 | 140 |
| |
138 | 141 |
| |
139 | 142 |
| |
| |||
442 | 445 |
| |
443 | 446 |
| |
444 | 447 |
| |
445 | - | ||
448 | + | ||
449 | + | ||
450 | + | ||
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | ||
455 | + | ||
456 | + | ||
457 | + | ||
458 | + | ||
459 | + | ||
460 | + | ||
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | ||
465 | + | ||
466 | + | ||
467 | + | ||
468 | + | ||
469 | + | ||
470 | + | ||
471 | + | ||
472 | + | ||
473 | + | ||
474 | + | ||
475 | + | ||
476 | + | ||
477 | + | ||
478 | + | ||
479 | + | ||
480 | + | ||
481 | + | ||
446 | 482 |
| |
447 | 483 |
| |
448 | 484 |
| |
|
0 commit comments