fix(ci): avoid rg dependency in changelog gate

This commit is contained in:
Peter Steinberger
2026-06-02 01:29:00 +01:00
parent ebbb2e8f01
commit 6667b9734a

View File

@@ -40,12 +40,19 @@ prepare_gates() {
fi
local has_changelog_update=false
if printf '%s\n' "$changed_files" | rg -q '^CHANGELOG\.md$'; then
has_changelog_update=true
fi
local unsupported_changelog_fragments
unsupported_changelog_fragments=$(printf '%s\n' "$changed_files" | rg '^changelog/fragments/' || true)
local unsupported_changelog_fragments=""
local changed_path
while IFS= read -r changed_path; do
[ -n "$changed_path" ] || continue
case "$changed_path" in
CHANGELOG.md)
has_changelog_update=true
;;
changelog/fragments/*)
unsupported_changelog_fragments="${unsupported_changelog_fragments}${changed_path}"$'\n'
;;
esac
done <<<"$changed_files"
if [ -n "$unsupported_changelog_fragments" ]; then
echo "Unsupported changelog fragment files detected:"
printf '%s\n' "$unsupported_changelog_fragments"