Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
from utils import changelog_convention
from utils import symphony_convention
from utils import just_message
from utils import create_file

tag = ''
tag_is_lowercase = False
tag_is_uppercase = False
tag_is_capitalized = False
convention = ''

file_path = Path("commiter.yml")
file_path = Path('commiter.yml')

if file_path.is_file():
with open(str(file_path), 'r') as stream:
Expand Down Expand Up @@ -52,12 +53,16 @@
if opt == 1:
print("You're using the angular convention")
angular_convention()
create_file('angular')
elif opt == 2:
print("You're using the changelog convention")
changelog_convention()
create_file('changelog')
elif opt == 3:
print("You're using the symphony convention")
symphony_convention()
create_file('symphony')
elif opt == 4:
print("You're not using a convention")
just_message()
create_file('none')
8 changes: 8 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from yaml import dump

possible_configurations = [
'tag',
Expand Down Expand Up @@ -57,3 +58,10 @@ def just_message():
# FUTURE: implement
def custom_convention():
pass

def create_file(convention_name):
data = dict(
convention = convention_name
)
with open('commiter.yml', 'w') as output_file:
dump(data, output_file, default_flow_style=False)