Skip to content

Commit

Permalink
Add repository info when getting federated extensions (#417)
Browse files Browse the repository at this point in the history
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
  • Loading branch information
nbowditch-einblick and fcollonval authored Nov 8, 2023
1 parent e5ebfc4 commit 641ddbe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jupyterlab_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ def get_federated_extensions(labextensions_path: list[str]) -> dict[str, Any]:
dependencies=pkgdata.get("dependencies", dict()),
jupyterlab=pkgdata.get("jupyterlab", dict()),
)

# Add repository info if available
if "repository" in pkgdata and "url" in pkgdata.get("repository", {}):
data["repository"] = dict(url=pkgdata.get("repository").get("url"))

install_path = osp.join(osp.dirname(ext_path), "install.json")
if osp.exists(install_path):
with open(install_path, encoding="utf-8") as fid:
Expand Down

0 comments on commit 641ddbe

Please sign in to comment.