File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -527,6 +527,8 @@ test('should print help', async () => {
527
527
edit=false [string]
528
528
--git-log-args additional git log arguments as space separated string,
529
529
example '--first-parent --cherry-pick' [string]
530
+ -l, --last just analyze the last commit; applies if edit=false
531
+ [boolean]
530
532
-o, --format output format of the results [string]
531
533
-p, --parser-preset configuration preset to use for
532
534
conventional-commits-parser [string]
Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ const cli = yargs
82
82
"additional git log arguments as space separated string, example '--first-parent --cherry-pick'" ,
83
83
type : 'string' ,
84
84
} ,
85
+ last : {
86
+ alias : 'l' ,
87
+ description : 'just analyze the last commit; applies if edit=false' ,
88
+ type : 'boolean' ,
89
+ } ,
85
90
format : {
86
91
alias : 'o' ,
87
92
description : 'output format of the results' ,
@@ -355,7 +360,11 @@ function checkFromEdit(flags: CliFlags): boolean {
355
360
}
356
361
357
362
function checkFromHistory ( flags : CliFlags ) : boolean {
358
- return typeof flags . from === 'string' || typeof flags . to === 'string' ;
363
+ return (
364
+ typeof flags . from === 'string' ||
365
+ typeof flags . to === 'string' ||
366
+ typeof flags . last === 'boolean'
367
+ ) ;
359
368
}
360
369
361
370
function normalizeFlags ( flags : CliFlags ) : CliFlags {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export interface CliFlags {
9
9
'help-url' ?: string ;
10
10
from ?: string ;
11
11
'git-log-args' ?: string ;
12
+ last ?: boolean ;
12
13
format ?: string ;
13
14
'parser-preset' ?: string ;
14
15
quiet : boolean ;
You can’t perform that action at this time.
0 commit comments