Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lucas SCHMIDT
sight
Commits
ebdefbfe
Commit
ebdefbfe
authored
Sep 07, 2021
by
Genial-O
Browse files
misc: update commit-msg git hook [skip ci]
parent
121105ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
.githooks/commit-msg
View file @
ebdefbfe
...
...
@@ -7,7 +7,7 @@ commit_msg_help = """
Required commit message:
type(scope): description
- type: enh, feat, fix, refactor
- scope: build, ci, core, doc,
graphics, io, physics
, test, ui, vi
sion
- scope: build, ci, core, doc,
filter, geometry, io, navigation
, test, ui, vi
z
or
type: description
- type: merge, misc, style
...
...
@@ -15,7 +15,7 @@ or
with
open
(
commit_msg_path
)
as
commit_msg_file
:
commit_msg_content
=
commit_msg_file
.
readline
()
message_regex
=
r
'(?:(?P<scoped_type>enh|feat|fix|refactor)\((?P<scope>build|ci|core|doc|geometry|io|
filter
|test|ui|viz)\)|(?P<unscoped_type>merge|misc|style)): (?P<subject>[a-z].*?(?:\b|[\]\)\'\"\`])$)'
message_regex
=
r
'(?:(?P<scoped_type>enh|feat|fix|refactor)\((?P<scope>build|ci|core|doc|
filter|
geometry|io|
navigation
|test|ui|viz)\)|(?P<unscoped_type>merge|misc|style)): (?P<subject>[a-z].*?(?:\b|[\]\)\'\"\`])$)'
if
not
re
.
match
(
message_regex
,
commit_msg_content
):
sys
.
stderr
.
write
(
"
\n
'"
+
commit_msg_content
.
strip
()
+
"' message doesn't follow commit rules.
\n
"
)
...
...
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