One of our convention in ceph-ansible is to not use capital letters in
task's name. So let's hardcode it in the initial phase of the pipeline.
ALso, this will let user discover what's wrong without us doing the
review and finding the problem.
Signed-off-by: Sébastien Han <seb@redhat.com>
echo "Sign-off ok!" && return 0
}
+function test_capital_letter {
+ for commit in $(git log --no-merges --pretty=format:"%h" origin/"${ghprbTargetBranch}"..HEAD); do
+ if git show "$commit" | grep -E "\\- name:" | grep '[[:upper:]]'; then
+ echo "'- name:' statement must not contain any capital letters!"
+ echo "Remove any capital letters from task's name."
+ return 1
+ fi
+ done
+ echo "No capital letters found in task's name!" && return 0
+}
+
########
# MAIN #
#ansible_lint
group_vars_check
test_sign_off
+test_capital_letter