File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ format: "{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .body}}\n\n{
165
165
| name | yes | - | Unique identifier for the item. |
166
166
| label | yes | - | This will be used as the label for the input field in the UI. |
167
167
| type | yes | - | The type of item. Determines which UI widget is shown. See the Item Types section to see all the different options. |
168
- | group | no | - | The name of the group this item belongs to. |
168
+ | group | no | - | The name of the group this item belongs to. Separates items into groups (you can think of groups as pages). |
169
169
| description | no | - | A short description of the item for user guidance. This will be displayed along with the input field. |
170
170
171
171
# ### Item Types
@@ -282,7 +282,7 @@ Properties:
282
282
| key | yes | The message shown in the UI. |
283
283
| value | yes | Unique identifier for the value. |
284
284
285
- # ## Groups
285
+ # ## Groups (Optional)
286
286
287
287
Group Properties :
288
288
Original file line number Diff line number Diff line change @@ -3,6 +3,17 @@ package config
3
3
const DefaultCommitTemplate = `---
4
4
name: default
5
5
default: true
6
+ groups:
7
+ - name: hasbreaking
8
+ depends_on:
9
+ and_conditions:
10
+ - parameter_name: page2.isbreaking
11
+ value_equals: true
12
+ - name: nobreaking
13
+ depends_on:
14
+ and_conditions:
15
+ - parameter_name: page2.isbreaking
16
+ value_equals: false
6
17
items:
7
18
- name: type
8
19
group: page1
@@ -38,12 +49,21 @@ items:
38
49
type: string
39
50
required: true
40
51
trim: true
41
- - name: body
42
- group: page3
52
+ - name: isbreaking
53
+ group: page2
54
+ label: "Are there any breaking changes?"
55
+ type: boolean
56
+ - name: hasbreakingbody
57
+ group: hasbreaking
58
+ label: "A BREAKING CHANGE commit requires a body. Provide additional contextual information about the code changes:"
59
+ type: text
60
+ required: true
61
+ - name: nobreakingbody
62
+ group: nobreaking
43
63
label: "Body. Provide additional contextual information about the code changes:"
44
64
type: text
45
65
- name: footer
46
66
group: page3
47
67
label: "Footer. Information about Breaking Changes and reference issues that this commit closes:"
48
68
type: text
49
- format: "{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .body }}\n\n{{.}}{{end}}{{with .footer}}\n\n{{.}}{{end}}"`
69
+ format: "{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .hasbreakingbody}}\n\n{{.}}{{end}}{{with .nobreakingbody }}\n\n{{.}}{{end}}{{with .footer}}\n\n{{.}}{{end}}"`
You can’t perform that action at this time.
0 commit comments