Skip to content

Commit

Permalink
Do not fetch draft release in check_changelog (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Sep 13, 2022
1 parent 7e4ad4b commit e602314
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jupyter_releaser/actions/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def make_group(name):
print("::endgroup::")


def setup():
def setup(fetch_draft_release=True):
with make_group("Prepare Environment"):
prepare_environment()
prepare_environment(fetch_draft_release=True)


def run_action(target, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion jupyter_releaser/actions/draft_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from jupyter_releaser.actions.common import make_group, run_action, setup
from jupyter_releaser.util import CHECKOUT_NAME, get_default_branch, handle_since

setup()
setup(False)

run_action("jupyter-releaser prep-git")

Expand Down
4 changes: 2 additions & 2 deletions jupyter_releaser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def extract_metadata_from_release_url(gh, release_url, auth):
return data


def prepare_environment():
def prepare_environment(fetch_draft_release=True):
"""Prepare the environment variables, for use when running one of the
action scripts."""
# Set up env variables
Expand Down Expand Up @@ -537,7 +537,7 @@ def prepare_environment():
# Get the latest draft release if none is given.
release_url = os.environ.get("RH_RELEASE_URL")
log(f"Environment release url was {release_url}")
if not release_url:
if not release_url and fetch_draft_release:
release = latest_draft_release(gh, branch)
if release:
release_url = release.html_url
Expand Down

0 comments on commit e602314

Please sign in to comment.