diff --git a/.github/workflows/5_changelog_check.yml b/.github/workflows/5_changelog_check.yml index 938cada5..2856c88e 100644 --- a/.github/workflows/5_changelog_check.yml +++ b/.github/workflows/5_changelog_check.yml @@ -32,10 +32,11 @@ jobs: FORMAT="✅" ENTRY_REGEX='^- .+ \(\[#[0-9]+\]\(https://github\.com/[^)]+/(issues|pull)/[0-9]+\)\)$' - INVALID=$(echo "$ADDED" | grep -E '^- ' | grep -vx -- '- None' | grep -vE "$ENTRY_REGEX" || true) + PRIOR_VERSION_REGEX='^- \[v[0-9]+\.[0-9]+\.[0-9]+\]\(https://github\.com/[^)]+/blob/v[0-9]+\.[0-9]+\.[0-9]+/CHANGELOG\.md\)$' + INVALID=$(echo "$ADDED" | grep -E '^- ' | grep -vx -- '- None' | grep -vE "$ENTRY_REGEX" | grep -vE "$PRIOR_VERSION_REGEX" || true) if [ -n "$INVALID" ]; then FORMAT="❌" - echo "::error::Invalid CHANGELOG.md entries. Expected format: '- Description ([#123](https://github.com///issues/123))'. Offending lines:" + echo "::error::Invalid CHANGELOG.md entries. Expected format: '- Description ([#123](https://github.com///issues/123))' or, for the Prior versions section, '- [vX.X.X](https://github.com///blob/vX.X.X/CHANGELOG.md)'. Offending lines:" echo "$INVALID" fi fi