Skip to content

Commit 903fd1e

Browse files
author
Steven Silvester
authored
Merge pull request #126 from afshin/fix-changelog
Fix Generate Changelog Action
2 parents 35213e0 + 5751c65 commit 903fd1e

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

.github/workflows/generate-changelog.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
required: true
88
branch:
99
description: The branch or reference name to filter pull requests by
10-
required: false
10+
required: true
1111
convert_to_rst:
1212
description: Whether to convert to RST
1313
required: false
@@ -53,8 +53,8 @@ jobs:
5353
export RH_SINCE=${{ github.event.inputs.since }}
5454
export RH_REF=refs/heads/${RH_BRANCH}
5555
export RH_REPOSITORY=${{ github.event.inputs.target }}
56-
export INPUT_UNTIL=${{ github.event.inputs.until }}
57-
export INPUT_CONVERT_TO_RST=${{ github.event.inputs.convert_to_rst }}
56+
export RH_UNTIL=${{ github.event.inputs.until }}
57+
export RH_CONVERT_TO_RST=${{ github.event.inputs.convert_to_rst }}
5858
python -m jupyter_releaser.actions.generate-changelog
5959
cat CHANGELOG_ENTRY.md
6060
- uses: actions/upload-artifact@v2

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,22 @@ jobs:
126126
RH_REPOSITORY: jupyter-server/jupyter_releaser
127127
RH_BRANCH: master
128128
RH_SINCE: v0.3.0
129-
INPUT_UNTIL: v0.4.0
129+
RH_UNTIL: v0.4.0
130130
run: |
131131
set -eux
132132
python -m jupyter_releaser.actions.generate-changelog
133133
cat CHANGELOG_ENTRY.md
134134
# Check for version entry in between the two versions and one outside
135135
cat CHANGELOG_ENTRY.md | grep -q "#95"
136136
cat CHANGELOG_ENTRY.md | grep -q "compare/v0.3.0...v0.4.0"
137+
# make sure it works with different settings
138+
export RH_SINCE=
139+
export RH_UNTIL=
140+
export RH_CONVERT_TO_RST=true
141+
sudo apt-get install pandoc
142+
pip install pypandoc
143+
python -m jupyter_releaser.actions.generate-changelog
144+
cat CHANGELOG_ENTRY.md
137145
- name: Coverage
138146
run: |
139147
codecov

jupyter_releaser/actions/generate-changelog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
branch = os.environ.get("RH_BRANCH")
1010
ref = os.environ.get("RH_REF")
1111
since = os.environ.get("RH_SINCE")
12-
until = os.environ.get("INPUT_UNTIL")
13-
convert_to_rst = os.environ.get("INPUT_CONVERT_TO_RST", "")
12+
until = os.environ.get("RH_UNTIL")
13+
convert_to_rst = os.environ.get("RH_CONVERT_TO_RST", "")
1414

1515
print("Generating changelog")
1616
print("target:", target)

jupyter_releaser/changelog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_version_entry(
6565
The new version
6666
since: str
6767
Use PRs with activity since this date or git reference
68-
until: str, option
68+
until: str, optional
6969
Use PRs until this date or git reference
7070
auth : str, optional
7171
The GitHub authorization token
@@ -90,6 +90,8 @@ def get_version_entry(
9090

9191
if until:
9292
until = until.replace("%", "")
93+
else:
94+
until = None
9395

9496
md = generate_activity_md(
9597
repo,

0 commit comments

Comments
 (0)