File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 7
7
from utils import changelog_convention
8
8
from utils import symphony_convention
9
9
from utils import just_message
10
+ from utils import create_file
10
11
11
12
tag = ''
12
13
tag_is_lowercase = False
13
14
tag_is_uppercase = False
14
15
tag_is_capitalized = False
15
16
convention = ''
16
17
17
- file_path = Path (" commiter.yml" )
18
+ file_path = Path (' commiter.yml' )
18
19
19
20
if file_path .is_file ():
20
21
with open (str (file_path ), 'r' ) as stream :
52
53
if opt == 1 :
53
54
print ("You're using the angular convention" )
54
55
angular_convention ()
56
+ create_file ('angular' )
55
57
elif opt == 2 :
56
58
print ("You're using the changelog convention" )
57
59
changelog_convention ()
60
+ create_file ('changelog' )
58
61
elif opt == 3 :
59
62
print ("You're using the symphony convention" )
60
63
symphony_convention ()
64
+ create_file ('symphony' )
61
65
elif opt == 4 :
62
66
print ("You're not using a convention" )
63
67
just_message ()
68
+ create_file ('none' )
Original file line number Diff line number Diff line change 1
1
import os
2
+ from yaml import dump
2
3
3
4
possible_configurations = [
4
5
'tag' ,
@@ -57,3 +58,10 @@ def just_message():
57
58
# FUTURE: implement
58
59
def custom_convention ():
59
60
pass
61
+
62
+ def create_file (convention_name ):
63
+ data = dict (
64
+ convention = convention_name
65
+ )
66
+ with open ('commiter.yml' , 'w' ) as output_file :
67
+ dump (data , output_file , default_flow_style = False )
You can’t perform that action at this time.
0 commit comments