@@ -447,8 +447,9 @@ export default class BackendAIImport extends BackendAIPage {
447447 const usageMode = 'general' ;
448448 const group = '' ; // user ownership
449449 const vhost_info = await globalThis . backendaiclient . vfolder . list_hosts ( ) ;
450+ const urlHost = new URL ( url ) . host ;
450451 let host = vhost_info . default ;
451- if ( new URL ( url ) . host === 'github.com' ) {
452+ if ( urlHost === 'github.com' || urlHost === 'codeload. github.com' ) {
452453 host = (
453454 this . shadowRoot ?. querySelector ( '#github-add-folder-host' ) as Select
454455 ) . value ;
@@ -461,7 +462,7 @@ export default class BackendAIImport extends BackendAIPage {
461462 return globalThis . backendaiclient . vfolder
462463 . create ( name , host , group , usageMode , permission )
463464 . then ( ( value ) => {
464- if ( new URL ( url ) . host === 'github.com' ) {
465+ if ( urlHost === 'github.com' || urlHost === 'codeload. github.com' ) {
465466 this . importNotebookMessage = _text ( 'import.FolderName' ) + name ;
466467 } else {
467468 this . importGitlabMessage = _text ( 'import.FolderName' ) + name ;
@@ -482,9 +483,10 @@ export default class BackendAIImport extends BackendAIPage {
482483 const vfolders = vfolderObj . map ( function ( value ) {
483484 return value . name ;
484485 } ) ;
486+ const urlHost = new URL ( url ) . host ;
485487 if ( vfolders . includes ( name ) ) {
486488 this . notification . text = _text ( 'import.FolderAlreadyExists' ) ;
487- if ( new URL ( url ) . host === 'github.com' ) {
489+ if ( urlHost === 'github.com' || urlHost === 'codeload. github.com' ) {
488490 this . importNotebookMessage = this . notification . text ;
489491 } else {
490492 this . importGitlabMessage = this . notification . text ;
0 commit comments