Skip to content

Commit eb38bf5

Browse files
committed
fix(ci): building error
Co-authored-by: None
1 parent fda915f commit eb38bf5

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

conventions/changelog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from os import system
22
from utils import get_text
3+
from utils import change_if_none
34

45

5-
def changelog_convention(co_author=''):
6+
def changelog_convention(co_author):
67
tag, msg = get_text()
78
tag = tag.upper()
9+
co_author = change_if_none(co_author)
810
composed_message = """%s: %s\n\nCo-authored-by: """ % (tag, context)
911
system("git commit -m '%s%s'" % (composed_message, co_author))

conventions/karma_angular.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from os import system
22
from utils import get_text
3+
from utils import change_if_none
34

45

5-
def angular_convention(co_author=''):
6+
def angular_convention(co_author):
67
tag, msg, context = get_text(context=True)
78
tag = tag.lower()
9+
co_author = change_if_none(co_author)
810
composed_message = """%s(%s): %s\n\nCo-authored-by:
911
""" % (tag, context, msg)
1012
system('git commit -m "%s%s"' % (composed_message, co_author))

conventions/no_convention.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from os import system
2+
from utils import change_if_none
23

34

4-
def just_message(co_author=''):
5+
def just_message(co_author):
56
msg = str(input("commit message: "))
7+
co_author = change_if_none(co_author)
68
composed = """%s\n\nCo-authored-by: """ % msg.capitalize()
79
system("git commit -m '%s%s'" % (composed, co_author))

conventions/symphony_cmf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from os import system
22
from utils import get_text
3+
from utils import change_if_none
34

45

5-
def symphony_convention(co_author=''):
6+
def symphony_convention(co_author):
67
tag, msg = get_text()
78
tag = tag.capitalize()
9+
co_author = change_if_none(co_author)
810
composed = """[%s] %s\n\nCo-authored-by: """ % (tag, msg)
911
system("git commit -m '%s%s'" % (composed, co_author))

generator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from utils import menu
1616
from utils import parser_cli
1717
from utils import create_file
18-
from utils import supported_conventions
1918

2019

2120
parser = parser_cli()

utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,11 @@ def parser_cli():
5151
dest="convention",
5252
help="selects a convention to be used for the commit")
5353
return parser
54+
55+
56+
def change_if_none(string):
57+
if string is None:
58+
return ''
59+
else:
60+
return string
61+

0 commit comments

Comments
 (0)