Commit a591c4ba authored by Maurice Kraus's avatar Maurice Kraus
Browse files

chore(util): this updates the commit-msg to the newly changed layout

parent 36ab7dd4
......@@ -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|viewlayer|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:\ntranslation, pod, datalayer, uilayer, akamuuikit, navigationlayer, core, viewmodel, view, filesystem, networking, database"
where the type is either:\nbuild, feat, fix, docs, style, refactor, test, chore
where the scope is either:\ntranslation, lib, datalayer, uilayer, akamuuikit, navigationlayer, core, viewmodel, viewlayer, filesystem, networking, database, util"
exit 1
end
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