Skip to content

Commit

Permalink
fix: generate markdown linter compliant changelog headers & lists (#597)
Browse files Browse the repository at this point in the history
In #594, I missed that there are 2 places where the version header is formatted
  • Loading branch information
ringohoffman committed Jun 1, 2023
1 parent 74df09b commit cc87400
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion semantic_release/vcs_helpers.py
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
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

0 comments on commit cc87400

Please sign in to comment.