diff --git a/CHANGELOG.md b/CHANGELOG.md index a4b5536..dcee3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,15 +20,17 @@ Each release lists its changes in these groups, in this order: ## [Unreleased] -Everything below is what the first release, `1.0.0`, will contain. Until it is -tagged the workflows are delivered from `main` and are not pinned. +## [1.0.0] - 2026-10-10 + +First release. The reusable workflow can be pinned at `v1` or `v1.0.0`. The +scoped workflows are delivered by the instance from `main` and cannot be pinned. ### Added -- Workflow `release.yml`: started by hand with a version, it releases only the tip of - `main` whose validation run is green and whose changelog entry exists, creates - the version tag, the release page and the major tag, and does nothing but - check until `dry_run` is set to `false`. +- Workflow `release.yml`: started by hand with a version, it releases only the + tip of `main` whose validation run is green and whose changelog entry exists, + creates the version tag, the release page and the major tag, and does nothing + but check until `dry_run` is set to `false`. - Scoped workflow `sync-github-metadata.yml`: copies the description and topics of a Gitea repository to its GitHub push mirror on every push to `main`, by hand and daily at 03:17 UTC. A repository without a GitHub mirror is skipped diff --git a/tests/test_changelog.py b/tests/test_changelog.py index c77def3..df64141 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -132,3 +132,9 @@ def test_the_changelog_of_this_repository_follows_the_convention(): text = (REPO_ROOT / "CHANGELOG.md").read_text(encoding="utf-8") assert changelog.validate(text) == [] assert changelog.parse(text)[0].is_unreleased + + +def test_wrapped_item_is_one_item_in_the_notes(): + text = "## [Unreleased]\n\n## [1.0.0] - 2026-10-10\n\n### Added\n\n- A long item that\n continues here.\n- Next.\n" + assert changelog.parse(text)[1].groups["Added"] == ["A long item that continues here.", "Next."] + assert "- A long item that continues here.\n" in changelog.notes(text, "1.0.0") diff --git a/tools/changelog.py b/tools/changelog.py index e8dc413..5b507ca 100644 --- a/tools/changelog.py +++ b/tools/changelog.py @@ -66,6 +66,9 @@ def parse(text: str) -> list[Release]: continue if group is not None and line.startswith("- "): releases[-1].groups[group].append(line[2:].strip()) + elif group is not None and line.startswith(" ") and releases[-1].groups[group]: + # a wrapped item: the lines that continue it belong to the same item + releases[-1].groups[group][-1] += " " + line.strip() return releases