From 756fffe2315a7ef6dfb3937a5e04c1719bf7d726 Mon Sep 17 00:00:00 2001 From: Gabriele De Rosa Date: Tue, 24 Mar 2026 14:58:06 +0100 Subject: [PATCH 1/2] fix: normalize changelog markdown so bullets render on separate lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The • character is not standard markdown list syntax, so consecutive bullet lines were rendered inline in previews. Add a post-processing step that inserts blank lines around ## headings and appends two trailing spaces (markdown hard break) to every bullet line. --- .gitignore | 3 + action.yml | 4 ++ scripts/normalize_changelog.py | 37 +++++++++++ tests/test_normalize_changelog.py | 106 ++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+) create mode 100644 .gitignore create mode 100644 scripts/normalize_changelog.py create mode 100644 tests/test_normalize_changelog.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3bbe7b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +*.pyc +*.pyo diff --git a/action.yml b/action.yml index 1027af1..ebdf5c6 100644 --- a/action.yml +++ b/action.yml @@ -320,6 +320,8 @@ runs: github_output.write(f"entry-file={path.resolve()}\n") PY + python3 "${{ github.action_path }}/scripts/normalize_changelog.py" "$CHANGELOG_FILE" + - name: Update CHANGELOG.md shell: bash run: | @@ -354,6 +356,8 @@ runs: changelog_path.write_text(updated, encoding="utf-8") PY + + python3 "${{ github.action_path }}/scripts/normalize_changelog.py" CHANGELOG.md env: CHANGELOG_FILE: ${{ steps.changelog.outputs.entry-file }} diff --git a/scripts/normalize_changelog.py b/scripts/normalize_changelog.py new file mode 100644 index 0000000..d10fe72 --- /dev/null +++ b/scripts/normalize_changelog.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +"""Normalize markdown formatting in changelog text. + +Ensures bullet lines (•) render on separate lines in markdown previews +and that ## headings are properly separated from surrounding content. +""" + +import argparse +import re +from pathlib import Path + + +def normalize(text): + # Ensure blank line before ## headings (when not already preceded by one) + text = re.sub(r"(? Date: Tue, 24 Mar 2026 15:00:45 +0100 Subject: [PATCH 2/2] docs: pin action version references to v2.0.1 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 00b98ec..7f447be 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ GitHub Action to generate a `CHANGELOG.md` on new tags, with optional Telegram n ## Breaking changes in 2.x -- The action now lives at the repository root and is used as `Waveful/ChangelogAction@2`. +- The action now lives at the repository root and is used as `Waveful/ChangelogAction@v2.0.1`. - The old split actions (`/generate`, `/notify`, `/annotate`) have been removed from the default setup. - Changelog generation is always the default behavior. - Telegram notification only runs when `telegram-bot-token`, `telegram-chat-id`, and `changelog-url` are all provided. @@ -67,7 +67,7 @@ jobs: steps: - name: Run changelog action id: changelog - uses: Waveful/ChangelogAction@2 + uses: Waveful/ChangelogAction@v2.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} target-branch: master