Skip to content

Fix link generator to use targetPath in urlpath construction#386

Open
ntaback wants to merge 1 commit intojupyterhub:mainfrom
ntaback:fix/link-generator-targetpath-urlpath
Open

Fix link generator to use targetPath in urlpath construction#386
ntaback wants to merge 1 commit intojupyterhub:mainfrom
ntaback:fix/link-generator-targetpath-urlpath

Conversation

@ntaback
Copy link

@ntaback ntaback commented Jan 24, 2026

Summary

  • When a custom targetPath is specified in the link generator, the urlpath parameter was incorrectly using the repo-derived directory name instead of the specified targetPath
  • Added getEffectiveCloneDirectory() helper function that returns targetPath when provided, falling back to the default name when empty
  • Updated displayLink() to use this helper for both regular repos and binder auth tab scenarios

Test plan

  • Tested locally with the link generator form
  • Verify generated links use targetPath when specified
  • Verify fallback to repo name when targetPath is empty

When a custom targetPath is specified, the link generator was not using
it when constructing the urlpath parameter. This fix ensures that
targetPath is used as the clone directory in the generated URL path,
falling back to the repo-derived name only when targetPath is empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant