Commit a8d1bc91 authored by Francesco Witz's avatar Francesco Witz
Browse files

Merge branch 'fix' into 'main'

fix: commit formatting check return in changelog generation use case

See merge request !5
parents d9abffb2 f9bbfe76
......@@ -233,16 +233,12 @@ def check_formating(project_path: str, before_gen: bool):
punctuation = set(string.punctuation)
if not any(char in punctuation for char in message):
print("✅ " + commit[1])
if before_gen:
return True
else:
print("❌ " + commit[1] + " ➡ The commit message must not contain special characters")
if before_gen:
return False
else:
print("✅ " + commit[1])
if before_gen:
return True
else:
print("❌ " + commit[1] + " ➡ The commit message has to be " + subject_case)
if before_gen:
......@@ -263,7 +259,9 @@ def check_formating(project_path: str, before_gen: bool):
print("❌ " + commit[1] + " ➡ This commit doesn't follow the intended format type: message")
if before_gen:
return False
print("\nCheck finished ! ✨")
print("\nCheck finished ! ✨")
if before_gen:
return True
# Explain to user how to edit the commits with git
if not before_gen:
print("ℹ You can edit your commit messages using the interactive version of the git rebase command !")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment