cwlviewer
cwlviewer copied to clipboard
support self-hosted gitlab URLs instead of having to fill out the long form
From question on forum -- CWL-viewer seems to have issues viewing a cwl workflows form gitlabs-- I replicated it as well. Link: https://gitlab.inria.fr/capsid.public_codes/CroMaSt/-/blob/main/CroMaSt.cwl
Link to question: https://gitlab.inria.fr/capsid.public_codes/CroMaSt/-/blob/main/CroMaSt.cwl
I went and found a another CWL workflow from gitlabs here -- https://gitlab.com/iidsgt/biocwl/-/blob/master/Workflows/Build-RNA-Indexes.cwl and it also couldn't render it -- so it might be a general issue with gitlab URLs.
This issue has been mentioned on Common Workflow Language Discourse. There might be relevant details there:
https://cwl.discourse.group/t/about-cwl-viewer/632/9
Hi, the URL provided, https://gitlab.inria.fr/capsid.public_codes/CroMaSt/-/blob/main/CroMaSt.cwl, does not pass the current regex tests in the JavaScript code https://github.com/common-workflow-language/cwlviewer/blob/3088d53f425f5a6cb922228b57e1b6f7671820a2/src/main/resources/static/js/main.js#L80-L98.
There are two regular expressions, one for GitHub, and for for GitLab. Respectively:
- https?://github.com
- https?://gitlab.com
So they expect that any URL provided to CWL Viewer starts with either github.com or gitlab.com.
@swzCuroverse now with so many companies hosting their own internal GitLab servers, I think maybe we should consider supporting other ways to verify if a URL is hosted on GitLab, GitHub, or any other git server (e.g. the Apache Software Foundation uses primarily gitweb, https://gitbox.apache.org/, but allows other projects to change and use gitlab/github with a mirror to gitweb/gitbox).
-Bruno
This issue has been mentioned on Common Workflow Language Discourse. There might be relevant details there:
https://cwl.discourse.group/t/about-cwl-viewer/632/10