Skip to content

[Release Note] New Dash GA #724

[Release Note] New Dash GA

[Release Note] New Dash GA #724

name: Check Release Notes Filenames
on:
pull_request:
jobs:
check-filenames:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2 # Ensures we have at least one previous commit for diffing
- name: Find invalid filenames in added/modified files
run: |
git fetch origin ${{ github.base_ref }} --depth=1
git diff --name-only --diff-filter=A origin/${{ github.base_ref }} | grep '^source/releasenotes/' | while read -r file; do
filename=$(basename "$file")
name="${filename%.*}" # Remove only the last extension
ext="${filename##*.}"
# Check for multiple dots in the filename (excluding extension)
if [[ "$name" == *.* ]]; then
echo "Invalid file: $file (multiple dots in filename)"
exit 1
fi
# Check for missing .md extension
if [[ "$ext" != "md" ]]; then
echo "Invalid file: $file (missing .md extension)"
exit 1
fi
done