Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Francesco Witz
Changelog Generator
Commits
f9bbfe76
Commit
f9bbfe76
authored
Feb 13, 2022
by
Francesco Witz
Browse files
fix: commit formatting check return in changelog generation use case
parent
57894942
Changes
1
Hide whitespace changes
Inline
Side-by-side
chlog.py
View file @
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
(
"
\n
Check finished ! ✨"
)
print
(
"
\n
Check 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 !"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment