Skip to content

Commit 384018d

Browse files
committed
refactor(cli): reorder commands
1 parent a032fa4 commit 384018d

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

commitizen/cli.py

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,9 @@
3434
# "required": True,
3535
"commands": [
3636
{
37-
"name": "ls",
38-
"help": "show available commitizens",
39-
"func": commands.ListCz,
40-
},
41-
{
42-
"name": ["changelog", "ch"],
43-
"help": (
44-
"generate changelog (note that it will overwrite existing file)"
45-
),
46-
"func": commands.Changelog,
47-
"arguments": [
48-
{
49-
"name": "--dry-run",
50-
"action": "store_true",
51-
"default": False,
52-
"help": "show changelog to stdout",
53-
},
54-
{
55-
"name": "--file-name",
56-
"default": "CHANGELOG.md",
57-
"help": "file name of changelog",
58-
},
59-
{
60-
"name": "--start-rev",
61-
"default": None,
62-
"help": (
63-
"start rev of the changelog."
64-
"If not set, it will generate changelog from the start"
65-
),
66-
},
67-
],
37+
"name": ["init"],
38+
"help": "init commitizen configuration",
39+
"func": commands.Init,
6840
},
6941
{
7042
"name": ["commit", "c"],
@@ -83,6 +55,11 @@
8355
},
8456
],
8557
},
58+
{
59+
"name": "ls",
60+
"help": "show available commitizens",
61+
"func": commands.ListCz,
62+
},
8663
{
8764
"name": "example",
8865
"help": "show commit example",
@@ -142,33 +119,30 @@
142119
],
143120
},
144121
{
145-
"name": ["version"],
122+
"name": ["changelog", "ch"],
146123
"help": (
147-
"get the version of the installed commitizen or the current project"
148-
" (default: installed commitizen)"
124+
"generate changelog (note that it will overwrite existing file)"
149125
),
150-
"func": commands.Version,
126+
"func": commands.Changelog,
151127
"arguments": [
152128
{
153-
"name": ["-p", "--project"],
154-
"help": "get the version of the current project",
129+
"name": "--dry-run",
155130
"action": "store_true",
156-
"exclusive_group": "group1",
131+
"default": False,
132+
"help": "show changelog to stdout",
157133
},
158134
{
159-
"name": ["-c", "--commitizen"],
160-
"help": "get the version of the installed commitizen",
161-
"action": "store_true",
162-
"exclusive_group": "group1",
135+
"name": "--file-name",
136+
"default": "CHANGELOG.md",
137+
"help": "file name of changelog",
163138
},
164139
{
165-
"name": ["-v", "--verbose"],
140+
"name": "--start-rev",
141+
"default": None,
166142
"help": (
167-
"get the version of both the installed commitizen "
168-
"and the current project"
143+
"start rev of the changelog."
144+
"If not set, it will generate changelog from the start"
169145
),
170-
"action": "store_true",
171-
"exclusive_group": "group1",
172146
},
173147
],
174148
},
@@ -194,9 +168,35 @@
194168
],
195169
},
196170
{
197-
"name": ["init"],
198-
"help": "init commitizen configuration",
199-
"func": commands.Init,
171+
"name": ["version"],
172+
"help": (
173+
"get the version of the installed commitizen or the current project"
174+
" (default: installed commitizen)"
175+
),
176+
"func": commands.Version,
177+
"arguments": [
178+
{
179+
"name": ["-p", "--project"],
180+
"help": "get the version of the current project",
181+
"action": "store_true",
182+
"exclusive_group": "group1",
183+
},
184+
{
185+
"name": ["-c", "--commitizen"],
186+
"help": "get the version of the installed commitizen",
187+
"action": "store_true",
188+
"exclusive_group": "group1",
189+
},
190+
{
191+
"name": ["-v", "--verbose"],
192+
"help": (
193+
"get the version of both the installed commitizen "
194+
"and the current project"
195+
),
196+
"action": "store_true",
197+
"exclusive_group": "group1",
198+
},
199+
],
200200
},
201201
],
202202
},

0 commit comments

Comments
 (0)