"""--no-changelog keeps the release body's frame and drops the commit sections.""" def test_no_changelog_keeps_the_frame_without_commit_sections(): from scripts import release commits = [{ "sha": "a" * 40, "short_sha": "a" * 8, "author_name": "Dev", "author_email": "dev@example.test", "subject": "feat: something (#5)", "category": "features", "github_author": "@dev", "coauthors": [], }] body = release.generate_changelog(commits, "rc.1-v1.2.4", "1.2.4", repo_url="https://github.com/o/r", prev_tag="v1.2.3", no_changelog=True) assert "Something" not in body and "@dev" not in body assert "" in body assert "https://github.com/o/r/compare/v1.2.3...rc.1-v1.2.4" in body