From d6385289d47b774fd181f2950f615bdc63b37651 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 15 Dec 2021 05:37:15 -0600 Subject: [PATCH 1/2] fix handling of empty documentation --- jupyter_releaser/changelog.py | 11 ++++------- setup.cfg | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/jupyter_releaser/changelog.py b/jupyter_releaser/changelog.py index 0ea95706..d151992a 100644 --- a/jupyter_releaser/changelog.py +++ b/jupyter_releaser/changelog.py @@ -125,15 +125,12 @@ def get_version_entry( entry = "\n".join(entry).strip() # Remove empty documentation entry if only automated changelogs were there - if "# Documentation improvements\n\n" in entry: + if ( + "# Documentation improvements" in entry + and not "# Documentation improvements\n\n-" in entry + ): entry = re.sub(r"#+ Documentation improvements\n\n", "", entry) - # Replace "*" unordered list marker with "-" since this is what - # Prettier uses - # TODO: remove after github_activity 0.1.4+ is available - entry = re.sub(r"^\* ", "- ", entry) - entry = re.sub(r"\n\* ", "\n- ", entry) - output = f""" ## {version} diff --git a/setup.cfg b/setup.cfg index 8f538148..3e78b23a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,7 @@ install_requires = check-manifest click ghapi - github-activity~=0.1 + github-activity~=0.2 importlib_resources jsonschema>=3.0.1 pre-commit From 4d730ddb3c7f531bf5a30f2bd9dd4d25a5309af9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 15 Dec 2021 05:55:21 -0600 Subject: [PATCH 2/2] update mock changelog --- jupyter_releaser/tests/util.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jupyter_releaser/tests/util.py b/jupyter_releaser/tests/util.py index ac1646e2..063b6f80 100644 --- a/jupyter_releaser/tests/util.py +++ b/jupyter_releaser/tests/util.py @@ -29,14 +29,14 @@ ### Merged PRs -* defining contributions [#14](https://github.com/executablebooks/github-activity/pull/14) ([@choldgraf](https://github.com/choldgraf)) -* updating CLI for new tags [#12](https://github.com/executablebooks/github-activity/pull/12) ([@choldgraf](https://github.com/choldgraf)) -* fixing link to changelog with refs [#11](https://github.com/executablebooks/github-activity/pull/11) ([@choldgraf](https://github.com/choldgraf)) -* adding contributors list [#10](https://github.com/executablebooks/github-activity/pull/10) ([@choldgraf](https://github.com/choldgraf)) -* some improvements to `since` and opened issues list [#8](https://github.com/executablebooks/github-activity/pull/8) ([@choldgraf](https://github.com/choldgraf)) -* Support git references etc. [#6](https://github.com/executablebooks/github-activity/pull/6) ([@consideRatio](https://github.com/consideRatio)) -* adding authentication information [#2](https://github.com/executablebooks/github-activity/pull/2) ([@choldgraf](https://github.com/choldgraf)) -* {PR_ENTRY} +- defining contributions [#14](https://github.com/executablebooks/github-activity/pull/14) ([@choldgraf](https://github.com/choldgraf)) +- updating CLI for new tags [#12](https://github.com/executablebooks/github-activity/pull/12) ([@choldgraf](https://github.com/choldgraf)) +- fixing link to changelog with refs [#11](https://github.com/executablebooks/github-activity/pull/11) ([@choldgraf](https://github.com/choldgraf)) +- adding contributors list [#10](https://github.com/executablebooks/github-activity/pull/10) ([@choldgraf](https://github.com/choldgraf)) +- some improvements to `since` and opened issues list [#8](https://github.com/executablebooks/github-activity/pull/8) ([@choldgraf](https://github.com/choldgraf)) +- Support git references etc. [#6](https://github.com/executablebooks/github-activity/pull/6) ([@consideRatio](https://github.com/consideRatio)) +- adding authentication information [#2](https://github.com/executablebooks/github-activity/pull/2) ([@choldgraf](https://github.com/choldgraf)) +- {PR_ENTRY} ### Contributors to this release