From 579672a7833c210b2bdbdb6eb3ea479620dc9bb8 Mon Sep 17 00:00:00 2001 From: jesusph04 Date: Wed, 5 Aug 2026 10:50:32 +0200 Subject: [PATCH] Extend changelog check to validate table entries --- .github/workflows/5_changelog_check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/5_changelog_check.yml b/.github/workflows/5_changelog_check.yml index 2856c88e..93993281 100644 --- a/.github/workflows/5_changelog_check.yml +++ b/.github/workflows/5_changelog_check.yml @@ -31,9 +31,10 @@ jobs: else FORMAT="✅" - ENTRY_REGEX='^- .+ \(\[#[0-9]+\]\(https://github\.com/[^)]+/(issues|pull)/[0-9]+\)\)$' - 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) + TABLE_ENTRY_REGEX='^\| \[#[0-9]+\]\(https://github\.com/[^)]+/(issues|pull)/[0-9]+\) \| .+ \|$' + TABLE_HEADER_REGEX='^\| Issue \| Comment \|$|^\| - \| - \|$' + PRIOR_VERSION_REGEX='^- \[v?[0-9]+\.[0-9]+\.[0-9]+\]\(https://github\.com/[^)]+/blob/[^)]+/CHANGELOG\.md\)$|^- \[\]\(\)$' + INVALID=$(echo "$ADDED" | grep -E '^(\||-)' | grep -vx -- '- None' | grep -vE "$TABLE_HEADER_REGEX" | grep -vE "$TABLE_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))' or, for the Prior versions section, '- [vX.X.X](https://github.com///blob/vX.X.X/CHANGELOG.md)'. Offending lines:"