File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed
Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ charset = utf-8
33indent_style = space
44end_of_line = lf
55trim_trailing_whitespace = false
6+ indent_size = 2
67
78[* .py ]
89indent_size = 4
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env python3
2+
13from pathlib import Path
24from yaml import safe_load
35from yaml import YAMLError
911from conventions .no_convention import just_message
1012
1113from utils import create_file
14+ from utils import supported_conventions as convention_list
15+
16+ import argparse
17+
18+ parser = argparse .ArgumentParser ()
19+ parser .add_argument ("--co-author" ,
20+ help = "make your friend an co-author to the commit" ,
21+ dest = "co_author" , default = None )
22+ parser .add_argument ("--no-generate" ,
23+ help = "disables the creation of a commiter.yml file" ,
24+ default = True , type = bool )
25+ parser .add_argument ('--convention' , choices = convention_list ,
26+ help = "selects a convention to be used for the commit" )
27+ parser .parse_args ()
1228
1329file_path = Path ('commiter.yml' )
1430if file_path .is_file ():
Original file line number Diff line number Diff line change 11pyyaml == 3.13
22pytest == 3.8.1
33pycodestyle == 2.4.0
4+ argparse == 1.4.0
Original file line number Diff line number Diff line change 11from yaml import dump
22
3+ supported_conventions = [
4+ "angular" ,
5+ "changelog" ,
6+ "symphony" ,
7+ "message_only" ,
8+ ]
39
410def get_text (context = False ):
511 if context :
You can’t perform that action at this time.
0 commit comments