Skip to content

Commit

Permalink
Merge pull request #230 from blink1073/fix-docs-header
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Dec 15, 2021
2 parents f827a42 + 4d730dd commit 233f676
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
11 changes: 4 additions & 7 deletions jupyter_releaser/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
16 changes: 8 additions & 8 deletions jupyter_releaser/tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 233f676

Please sign in to comment.