Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generate markdown linter compliant changelog headers & lists #597

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion semantic_release/vcs_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def update_changelog_file(version: str, content_to_add: str):
[
changelog_placeholder,
"",
f"## v{version} ({date.today():%Y-%m-%d})",
f"## v{version} ({date.today():%Y-%m-%d})\n",
content_to_add,
]
),
Expand Down
12 changes: 6 additions & 6 deletions tests/test_vcs_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def test_update_changelog_file_ok(mock_git, mocker):
"\n"
"<!--next-version-placeholder-->\n"
"\n"
"## v1.0.0 (2015-08-04)\n"
"## v1.0.0 (2015-08-04)\n\n"
"### Feature\n"
"* Just a start"
)
Expand All @@ -464,13 +464,13 @@ def test_update_changelog_file_ok(mock_git, mocker):
"\n"
"<!--next-version-placeholder-->\n"
"\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n\n"
"### Fix\n"
"* Fix a bug\n"
"### Feature\n"
"* Add something awesome\n"
"\n"
"## v1.0.0 (2015-08-04)\n"
"## v1.0.0 (2015-08-04)\n\n"
"### Feature\n"
"* Just a start"
)
Expand All @@ -491,7 +491,7 @@ def test_update_changelog_file_missing_file(mock_git, mocker):
"\n"
"<!--next-version-placeholder-->\n"
"\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n\n"
"* Some new content\n"
)

Expand All @@ -513,7 +513,7 @@ def test_update_changelog_file_missing_placeholder_but_containing_header(
"\n"
"<!--next-version-placeholder-->\n"
"\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n\n"
"* Some new content\n"
)

Expand All @@ -531,7 +531,7 @@ def test_update_changelog_empty_file(mock_git, mocker):
"\n"
"<!--next-version-placeholder-->\n"
"\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n"
f"## v2.0.0 ({date.today():%Y-%m-%d})\n\n"
"* Some new content\n"
)

Expand Down