From 641ddbe75cf194cd343f9fba05226f365d36765a Mon Sep 17 00:00:00 2001 From: Nate Bowditch <111072326+nbowditch-einblick@users.noreply.github.com> Date: Wed, 8 Nov 2023 07:38:40 -0500 Subject: [PATCH] Add repository info when getting federated extensions (#417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Collonval --- jupyterlab_server/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jupyterlab_server/config.py b/jupyterlab_server/config.py index a8e7744b..3a397608 100644 --- a/jupyterlab_server/config.py +++ b/jupyterlab_server/config.py @@ -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: