Skip to content

Commit 0ca050b

Browse files
authored
Get repository from release url if given (#377)
1 parent 3d0b031 commit 0ca050b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jupyter_releaser/util.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,12 @@ def prepare_environment():
490490
action scripts."""
491491
# Set up env variables
492492
if not os.environ.get("RH_REPOSITORY"):
493-
os.environ["RH_REPOSITORY"] = os.environ["GITHUB_REPOSITORY"]
493+
if os.environ.get("RH_RELEASE_URL"):
494+
match = parse_release_url(os.environ["RH_RELEASE_URL"])
495+
owner, repo = match["owner"], match["repo"]
496+
os.environ["RH_REPOSITORY"] = f"{owner}/{repo}"
497+
else:
498+
os.environ["RH_REPOSITORY"] = os.environ["GITHUB_REPOSITORY"]
494499
if not os.environ.get("RH_REF"):
495500
os.environ["RH_REF"] = os.environ["GITHUB_REF"]
496501

0 commit comments

Comments
 (0)