55 "angular" ,
66 "changelog" ,
77 "symphony" ,
8- "message_only " ,
8+ "message " ,
99]
1010
1111menu = """
@@ -31,25 +31,31 @@ def get_text(context=False):
3131 return tag , msg
3232
3333
34- def create_file (convention_name ):
35- data = dict (
36- convention = convention_name
37- )
38- with open ('commiter.yml' , 'w' ) as output_file :
39- dump (data , output_file , default_flow_style = False )
34+ def create_file (convention_name , dont_create = False ):
35+ if not dont_create :
36+ data = dict (
37+ convention = convention_name
38+ )
39+ with open ('commiter.yml' , 'w' ) as output_file :
40+ dump (data , output_file , default_flow_style = False )
4041
4142
4243def parser_cli ():
43- parser = argparse .ArgumentParser ()
44+ desc = "A commit formatter tool to help you follow commit conventions."
45+ help_convention = \
46+ """
47+ Selects a convention to be used for the commit.
48+ Required if there's no commiter.yml file.
49+ """
50+ parser = argparse .ArgumentParser (description = desc )
4451 parser .add_argument ("--co-author" ,
4552 help = "make your friend an co-author to the commit" ,
4653 dest = "co_author" , default = None )
4754 parser .add_argument ("--no-generate" , dest = "no_file" ,
4855 help = "disables the creation of a commiter.yml file" ,
4956 default = True , type = bool )
5057 parser .add_argument ("--convention" , choices = supported_conventions ,
51- dest = "convention" ,
52- help = "selects a convention to be used for the commit" )
58+ dest = "convention" , default = '' , help = help_convention )
5359 return parser
5460
5561
0 commit comments