Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Akamu
Game Client iOS
Commits
a591c4ba
Commit
a591c4ba
authored
Nov 10, 2019
by
Maurice Kraus
Browse files
chore(util): this updates the commit-msg to the newly changed layout
parent
36ab7dd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitHooks/commit-msg
View file @
a591c4ba
...
...
@@ -19,13 +19,19 @@ for line in message_array
end
$regex
=
/^(?<whole>(?<type>build|feat|fix|docs|style|refactor|
perf|
test|chore)(?<scope>\((translation|
pod
|datalayer|uilayer|akamuuikit|navigationlayer|core|viewmodel|view|filesystem|networking|database)\))?: .*[^\.]\w)(?<detail>(\n\n).(.|\n.)*)?$/m
$regex
=
/^(?<whole>(?<type>build|feat|fix|docs|style|refactor|test|chore)(?<scope>\((translation|
lib
|datalayer|uilayer|akamuuikit|navigationlayer|core|viewmodel|view
layer
|filesystem|networking|database
|util
)\))?: .*[^\.]\w)(?<detail>(\n\n).(.|\n.)*)?$/m
match
=
$regex
.
match
(
message_filtered
)
if
/[[:upper:]]/
.
match
(
match
.
to_s
.
partition
(
':'
).
last
.
strip
[
0
])
puts
"Your message is not formatted correctly!"
puts
"The first letter after <type>[(optional scope)]: should be lowercase!"
exit
1
end
if
match
!=
nil
&&
match
[
:detail
]
detail
=
match
[
:detail
]
detail
=
detail
.
split
(
"
\n
"
)
# im not quite sure why it starts with an empty line
for
i
in
(
1
...
detail
.
length
).
step
(
1
)
do
if
i
==
1
...
...
@@ -51,6 +57,7 @@ puts "Your message should be in the format:\n
<type>[(optional scope)]: <description>
[optional body]
\n
where the scope is either:
\n
translation, pod, datalayer, uilayer, akamuuikit, navigationlayer, core, viewmodel, view, filesystem, networking, database"
where the type is either:
\n
build, feat, fix, docs, style, refactor, test, chore
where the scope is either:
\n
translation, lib, datalayer, uilayer, akamuuikit, navigationlayer, core, viewmodel, viewlayer, filesystem, networking, database, util"
exit
1
end
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