fix(decorate-pr): replace piped while-read with process substitution for docs-only detection

This commit is contained in:
Micheal Wilkinson
2026-03-21 14:56:38 +00:00
parent 3f555fb894
commit 224ba03ca4

View File

@@ -229,7 +229,7 @@ runs:
has_qualifying_changes=false has_qualifying_changes=false
if [[ "$total_files" -gt 0 ]]; then if [[ "$total_files" -gt 0 ]]; then
printf '%s' "$diff_data" | jq -r '.[].filename' 2>/dev/null | while read -r filename; do while IFS= read -r filename; do
# Check if file matches docs globs # Check if file matches docs globs
is_doc=false is_doc=false
IFS=',' read -ra glob_array <<< "$DOCS_GLOBS" IFS=',' read -ra glob_array <<< "$DOCS_GLOBS"
@@ -242,7 +242,7 @@ runs:
fi fi
done done
# .md files are always docs unless they're actual code docs with changes # .md files are always docs
if [[ "$filename" == *.md ]]; then if [[ "$filename" == *.md ]]; then
is_doc=true is_doc=true
fi fi
@@ -250,7 +250,7 @@ runs:
if [[ "$is_doc" != "true" ]]; then if [[ "$is_doc" != "true" ]]; then
docs_only_true=false docs_only_true=false
fi fi
done done < <(printf '%s' "$diff_data" | jq -r '.[].filename' 2>/dev/null)
fi fi
# Get changeset for changelog file # Get changeset for changelog file