|
12 | 12 | from conventions.no_convention import just_message |
13 | 13 |
|
14 | 14 | # utils imports |
15 | | -from utils import create_file |
16 | 15 | from utils import menu |
17 | 16 | from utils import parser_cli |
| 17 | +from utils import create_file |
| 18 | +from utils import supported_conventions |
18 | 19 |
|
19 | 20 |
|
20 | 21 | parser = parser_cli() |
| 22 | +args = parser.parse_args() |
21 | 23 |
|
22 | 24 | file_path = Path('commiter.yml') |
23 | 25 | if file_path.is_file(): |
|
30 | 32 | convention = 'none' |
31 | 33 | if convention == 'angular' or convention == 'karma': |
32 | 34 | print('You are using the %s convention' % convention) |
33 | | - angular_convention() |
| 35 | + angular_convention(args.co_author) |
34 | 36 | elif convention == 'changelog': |
35 | 37 | print('You are using the %s convention' % convention) |
36 | | - changelog_convention() |
| 38 | + changelog_convention(args.co_author) |
37 | 39 | elif convention == 'symphony': |
38 | 40 | print('You are using the %s convention' % convention) |
39 | | - symphony_convention() |
| 41 | + symphony_convention(args.co_author) |
40 | 42 | elif convention == 'none': |
41 | | - just_message() |
| 43 | + just_message(args.co_author) |
42 | 44 | except YAMLError as exc: |
43 | 45 | print(exc) |
44 | 46 | else: |
45 | 47 | print("No config files found!\nRunning default script...") |
46 | 48 | opt = int(input(menu) or 4) |
47 | 49 | if opt == 1: |
48 | 50 | print("You're using the angular convention") |
49 | | - angular_convention() |
| 51 | + angular_convention(parser.co_author) |
50 | 52 | create_file('angular') |
51 | 53 | elif opt == 2: |
52 | 54 | print("You're using the changelog convention") |
53 | | - changelog_convention() |
| 55 | + changelog_convention(args.co_author) |
54 | 56 | create_file('changelog') |
55 | 57 | elif opt == 3: |
56 | 58 | print("You're using the symphony convention") |
57 | | - symphony_convention() |
| 59 | + symphony_convention(args.co_author) |
58 | 60 | create_file('symphony') |
59 | 61 | elif opt == 4: |
60 | 62 | print("You're not using a convention") |
61 | | - just_message() |
| 63 | + just_message(args.co_author) |
62 | 64 | create_file('none') |
0 commit comments