]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-pr-syntax-check: do not check for removed lines 1099/head
authorSébastien Han <seb@redhat.com>
Mon, 13 Aug 2018 16:36:09 +0000 (18:36 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 14 Aug 2018 13:58:14 +0000 (15:58 +0200)
The git show was returning - and + lines, we only want to check for
lines that were added not removed.

Signed-off-by: Sébastien Han <seb@redhat.com>
ceph-ansible-pr-syntax-check/build/build

index f561e58b8f5be86d9246b02c5daa6aaacf8e564a..48a9b0c5b1b7d969b61dbe3c4cda6975aa5cd679 100644 (file)
@@ -59,7 +59,7 @@ function test_sign_off {
 
 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
+    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