diff --git a/.github/workflows/pr-path-detection.yml b/.github/workflows/pr-path-detection.yml index ec856355..b20f75ca 100644 --- a/.github/workflows/pr-path-detection.yml +++ b/.github/workflows/pr-path-detection.yml @@ -26,9 +26,9 @@ jobs: fail="FALSE" merged_commit=$(git log -1 --format='%H') changed_files="$(git diff --name-status --diff-filter=ARM ${{ github.event.pull_request.base.sha }} ${merged_commit} | awk '/\.md$/ {print $NF}')" - if [ -n "changed_files" ]; then + if [ -n "$changed_files" ]; then for changed_file in $changed_files; do - url_lines=$(grep -H -Eo '\]\(http[s]?://[^)]+\)' "$changed_file" | grep -Ev 'GenAIEval/blob/main') + url_lines=$(grep -H -Eo '\]\(http[s]?://[^)]+\)' "$changed_file" | grep -Ev 'GenAIEval/blob/main') || true if [ -n "$url_lines" ]; then for url_line in $url_lines; do url=$(echo "$url_line"|cut -d '(' -f2 | cut -d ')' -f1|sed 's/\.git$//')