24
24
def gen_co_author (co_author ):
25
25
if co_author is '' :
26
26
return ''
27
- return " \n Co-authored-by: %s" % co_author
27
+ return ' \n Co-authored-by: %s' % co_author
28
28
29
29
30
30
def create_file (convention_name , dont_create = False ): # pragma: no cover
@@ -38,23 +38,36 @@ def create_file(convention_name, dont_create=False): # pragma: no cover
38
38
39
39
40
40
def parser_cli ():
41
- desc = " A commit formatter tool to help you follow commit conventions."
41
+ desc = ' A commit formatter tool to help you follow commit conventions.'
42
42
help_convention = \
43
43
"""
44
44
Selects a convention to be used for the commit.
45
45
Required if there's no commiter.yml file.
46
46
"""
47
47
parser = argparse .ArgumentParser (description = desc )
48
- parser .add_argument ("-ca" , "--co-author" ,
49
- help = "Make your friend an co-author to the commit" ,
50
- dest = "co_author" , default = '' )
51
- parser .add_argument ("-nf" , "--no-file" , dest = "no_file" ,
52
- help = "Disables the creation of a commiter.yml file" ,
53
- action = "store_true" )
54
- parser .add_argument ("-c" , "--convention" , choices = supported_conventions ,
55
- dest = "convention" , default = '' , help = help_convention )
56
- parser .add_argument ("-d" , "--debug" , action = "store_true" , dest = "debug" ,
57
- help = "Toggles debug option" )
48
+ parser .add_argument ('-t' , '--tag' , dest = 'tag' , default = '' ,
49
+ help = 'Pass your commit tag directly' )
50
+
51
+ parser .add_argument ('-m' , '--message' , dest = 'message' , default = '' ,
52
+ help = 'Pass your commit message directly' )
53
+
54
+ parser .add_argument ('-ct' , '--context' , dest = 'context' , default = '' ,
55
+ help = 'Pass your commit context directly' )
56
+
57
+ parser .add_argument ('-ca' , '--co-author' ,
58
+ help = 'Make your friend an co-author to the commit' ,
59
+ dest = 'co_author' , default = '' )
60
+
61
+ parser .add_argument ('-nf' , '--no-file' , dest = 'no_file' ,
62
+ help = 'Disables the creation of a commiter.yml file' ,
63
+ action = 'store_true' )
64
+
65
+ parser .add_argument ('-c' , '--convention' , choices = supported_conventions ,
66
+ dest = 'convention' , default = '' , help = help_convention )
67
+
68
+ parser .add_argument ('-d' , '--debug' , action = 'store_true' , dest = 'debug' ,
69
+ help = 'Toggles debug option' )
70
+
58
71
return parser
59
72
60
73
0 commit comments