File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
src/main/resources/static/js Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -79,17 +79,22 @@ require(['jquery'],
7979 var pathPattern = new RegExp ( "^\\/?([^\\/]*\\/)*[^\\/]+\\.cwl$" ) ;
8080 var input = $ ( "#url" ) . val ( ) ;
8181 if ( gitPattern . test ( input ) ) {
82- var success = true ;
83- if ( ! $ ( "#branch" ) . val ( ) ) {
84- addWarning ( "branch" , "You must provide a branch name for the workflow" ) ;
85- success = false ;
86- }
87- if ( ! $ ( "#path" ) . val ( ) ) {
88- addWarning ( "path" , "You must provide a path to the workflow" ) ;
89- success = false ;
90- } else if ( ! pathPattern . test ( $ ( "#path" ) . val ( ) ) ) {
91- addWarning ( "path" , "Must be a valid path from the root to a .cwl workflow" ) ;
92- success = false ;
82+ var success = false ;
83+ if ( input . startsWith ( "ssh" ) || input . startsWith ( "git@" ) ) {
84+ addWarning ( "url" , "SSH is not supported as a protocol, please provide a HTTPS URL to clone" ) ;
85+ } else {
86+ success = true ;
87+ if ( ! $ ( "#branch" ) . val ( ) ) {
88+ addWarning ( "branch" , "You must provide a branch name for the workflow" ) ;
89+ success = false ;
90+ }
91+ if ( ! $ ( "#path" ) . val ( ) ) {
92+ addWarning ( "path" , "You must provide a path to the workflow" ) ;
93+ success = false ;
94+ } else if ( ! pathPattern . test ( $ ( "#path" ) . val ( ) ) ) {
95+ addWarning ( "path" , "Must be a valid path from the root to a .cwl workflow" ) ;
96+ success = false ;
97+ }
9398 }
9499 return success ;
95100 } else if ( ! githubPattern . test ( input ) && ! gitlabPattern . test ( input ) ) {
You can’t perform that action at this time.
0 commit comments