diff --git a/.github/scripts/generate_changelog.py b/.github/scripts/generate_changelog.py index 70f498e..5156ac9 100644 --- a/.github/scripts/generate_changelog.py +++ b/.github/scripts/generate_changelog.py @@ -23,8 +23,20 @@ def main() -> None: previous = next((tag for tag in tags if tag != args.tag), None) revision = f"{previous}..{args.tag}" if previous else args.tag subjects = git("log", revision, "--format=%s").splitlines() + # A commit reverted within the same release never shipped: drop it together with its revert. + reverted: dict[str, int] = {} + for subject in subjects: + revert = re.fullmatch(r'Revert "(.+)"', subject) + if revert: + reverted[revert.group(1)] = reverted.get(revert.group(1), 0) + 1 grouped: dict[str, list[str]] = {} for subject in subjects: + if reverted.get(subject): + reverted[subject] -= 1 + continue + # The changelog commit of the previous release, made by the changelog job itself. + if re.fullmatch(r"docs: update changelog for v\S+", subject): + continue match = re.match(r"([a-z]+)(?:\([^)]*\))?(!)?:\s*(.+)", subject) if not match: continue diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cd116..e703260 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,10 +15,6 @@ All notable changes are documented here. - show request duration in debug RESPONSE - always pair debug REQUEST with a RESPONSE line - compact timestamped debug output -- improve concise debug readability -- format debug output as Linux-style lines -- add concise and trace debug modes -- harden structured debug logging - label server exchanges as JSON blocks - show readable solve duration - add final solve debug summary @@ -41,14 +37,12 @@ All notable changes are documented here. - align debug guide with runnable example - add debug mode example, disable debug in Kaleidoscope example - align README with current SDK -- enable debug directly in Kaleidoscope example - print Kaleidoscope result as JSON - explain example execution flows - make Kaleidoscope example ready to run - add Kaleidoscope example asset - drop npm publishing from missing pipeline features - document integration tests running on pull requests -- update changelog for v1.1.0 ### Maintenance