Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mangle GIN URLs a bit more #3

Closed
Tracked by #5
mslw opened this issue Apr 11, 2023 · 2 comments
Closed
Tracked by #5

Mangle GIN URLs a bit more #3

mslw opened this issue Apr 11, 2023 · 2 comments

Comments

@mslw
Copy link
Collaborator

mslw commented Apr 11, 2023

With my updated workflow I got ssh://[email protected]/user/repo.git as distribution.url (origin) from metalad_core. This translated into a non-functional "View on GIN" button, as it kept the SSH URL. This can be solved with a following patch:

diff --git a/docs/assets/app_component_dataset.js b/docs/assets/app_component_dataset.js
index 1e991f0..d19dd04 100644
--- a/docs/assets/app_component_dataset.js
+++ b/docs/assets/app_component_dataset.js
@@ -143,6 +143,7 @@ const datasetView = () =>
                     disp_dataset.is_gin = true;
                     disp_dataset.url = dataset.url[i];
                     disp_dataset.url = disp_dataset.url.replace('[email protected]:', 'https://gin.g-node.org');
+                    disp_dataset.url = disp_dataset.url.replace('ssh://[email protected]', 'https://gin.g-node.org');
                   }
                 }
                 if (!disp_dataset.url) {

Not sure if that's a change in the dataset or in metalad_core (using 0.4.16) - catalog already mangles the paths (as seen above) and I'm sure it worked before.

@mslw mslw mentioned this issue Apr 12, 2023
18 tasks
@jsheunis
Copy link
Collaborator

Could be that it worked previously because of a patch that was applied in a specific catalog rendering, and not in datalad-catalog itself. I will fix this.

@mslw
Copy link
Collaborator Author

mslw commented Apr 19, 2023

I think these are now properly mangled :-)

(and I also realized the importance for fixing them "at the source", for those who come through the superdataset and not through the catalog)

@mslw mslw closed this as completed Apr 19, 2023
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

No branches or pull requests

2 participants