Skip to content

Commit 625b969

Browse files
committed
Fix Create Changelog Action
1 parent 3127bd9 commit 625b969

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
3+
import os
4+
5+
from jupyter_releaser.util import CHECKOUT_NAME
6+
from jupyter_releaser.util import get_latest_tag
7+
from jupyter_releaser.util import log
38
from jupyter_releaser.util import run
49

510
run("jupyter-releaser prep-git")
11+
12+
# Capture the "since" argument in case we add tags befor checking changelog
13+
# Do this before bumping the version
14+
if not os.environ.get("RH_SINCE"):
15+
curr_dir = os.getcwd()
16+
os.chdir(CHECKOUT_NAME)
17+
since = get_latest_tag(os.environ["RH_BRANCH"]) or ""
18+
if since:
19+
log(f"Capturing {since} in RH_SINCE variable")
20+
os.environ["RH_SINCE"] = since
21+
os.chdir(curr_dir)
22+
623
run("jupyter-releaser bump-version")
724
run("jupyter-releaser build-changelog")
825
run("jupyter-releaser draft-changelog")

jupyter_releaser/actions/draft_release.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333

3434
run("jupyter-releaser prep-git")
3535

36-
# Capture the "since" argument in case we add tags before the second
37-
# "Check Changelog"
36+
# Capture the "since" argument in case we add tags befor checking changelog
3837
# Do this before bumping the version
3938
if not os.environ.get("RH_SINCE"):
4039
curr_dir = os.getcwd()

0 commit comments

Comments
 (0)