Skip to content

Commit

Permalink
Use urljoin
Browse files Browse the repository at this point in the history
Avoid double `//` in generated URL, which breaks Gitlab's UI.
  • Loading branch information
haampie authored Jul 18, 2023
1 parent 55e5265 commit bdae376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spackbot/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async def run_pipeline_task(event):

detailed_status = result.get("detailed_status", {})
if "details_path" in detailed_status:
url = f"{helpers.spack_gitlab_url}/{detailed_status['details_path']}"
url = urllib.parse.urljoin(helpers.spack_gitlab_url, detailed_status["details_path"])
logger.info(f"Triggering pipeline on {branch}: {url}")
msg = f"I've started that [pipeline]({url}) for you!"
await gh.post(comments_url, {}, data={"body": msg})
Expand Down

0 comments on commit bdae376

Please sign in to comment.