Skip to content

Commit d638528

Browse files
committed
fix handling of empty documentation
1 parent f827a42 commit d638528

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

jupyter_releaser/changelog.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,12 @@ def get_version_entry(
125125
entry = "\n".join(entry).strip()
126126

127127
# Remove empty documentation entry if only automated changelogs were there
128-
if "# Documentation improvements\n\n" in entry:
128+
if (
129+
"# Documentation improvements" in entry
130+
and not "# Documentation improvements\n\n-" in entry
131+
):
129132
entry = re.sub(r"#+ Documentation improvements\n\n", "", entry)
130133

131-
# Replace "*" unordered list marker with "-" since this is what
132-
# Prettier uses
133-
# TODO: remove after github_activity 0.1.4+ is available
134-
entry = re.sub(r"^\* ", "- ", entry)
135-
entry = re.sub(r"\n\* ", "\n- ", entry)
136-
137134
output = f"""
138135
## {version}
139136

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ install_requires =
3131
check-manifest
3232
click
3333
ghapi
34-
github-activity~=0.1
34+
github-activity~=0.2
3535
importlib_resources
3636
jsonschema>=3.0.1
3737
pre-commit

0 commit comments

Comments
 (0)