From dba4de0a1294d14840ccfc812799ef6b63725935 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 30 Mar 2020 11:37:26 +0200 Subject: [PATCH] Clarify extract_top_version when creating a new section Signed-off-by: Gilles Peskine --- scripts/assemble_changelog.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py index d11e2e8ba..ffa3f161b 100755 --- a/scripts/assemble_changelog.py +++ b/scripts/assemble_changelog.py @@ -88,12 +88,14 @@ class ChangelogFormat: def extract_top_version(cls, changelog_file_content): """Split out the top version section. - Return ``(header, top_version_title, top_version_body, trailer)`` - where ``changelog_file_content == header + top_version_title + - top_version_body + trailer``. - If the top version is already released, create a new top version section for an unreleased version. + + Return ``(header, top_version_title, top_version_body, trailer)`` + where the "top version" is the existing top version section if it's + for unreleased changes, and a newly created section otherwise. + To assemble the changelog after modifying top_version_body, + concatenate the four pieces. """ raise NotImplementedError