From 6bdecaf8c6c3e741949fc5437ee88f59a82493f4 Mon Sep 17 00:00:00 2001 From: Carlos Alvarez Date: Thu, 31 Oct 2024 11:44:01 -0400 Subject: [PATCH] Fix broken check --- .github/scripts/enforceRedirect.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/enforceRedirect.sh b/.github/scripts/enforceRedirect.sh index 4d7d169b01c5..b7dc7abc80ed 100755 --- a/.github/scripts/enforceRedirect.sh +++ b/.github/scripts/enforceRedirect.sh @@ -13,13 +13,13 @@ declare -r REDIRECTS_FILE="docs/redirects.csv" hasRenamedOrDeletedArticle=false hasModifiedRedirect=false -if git log origin/main..HEAD --name-status --pretty=format: $ARTICLES_DIRECTORY | grep -q -E "^(R|D)" +if git diff origin/main..HEAD --name-status --pretty=format: $ARTICLES_DIRECTORY | grep -q -E "^(R|D)" then echo "Articles have been renamed/moved/deleted" hasRenamedOrDeletedArticle=true fi -if git log origin/main..HEAD --name-status --pretty=format: $REDIRECTS_FILE | grep -q -E "^(M)" +if git diff origin/main..HEAD --name-status --pretty=format: $REDIRECTS_FILE | grep -q -E "^(M)" then echo "Redirects.csv has been modified" hasModifiedRedirect=true