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'],
79
79
var pathPattern = new RegExp ( "^\\/?([^\\/]*\\/)*[^\\/]+\\.cwl$" ) ;
80
80
var input = $ ( "#url" ) . val ( ) ;
81
81
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
+ }
93
98
}
94
99
return success ;
95
100
} else if ( ! githubPattern . test ( input ) && ! gitlabPattern . test ( input ) ) {
You can’t perform that action at this time.
0 commit comments