mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 22:28:05 +01:00 
			
		
		
		
	Backport #35166 by @lunny Fix #35162 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
							parent
							
								
									f4b4b0bf98
								
							
						
					
					
						commit
						d05cf08fad
					
				| @ -34,8 +34,12 @@ export function initRepoMigration() { | ||||
|     elCloneAddr.addEventListener('input', () => { | ||||
|       if (repoNameChanged) return; | ||||
|       let repoNameFromUrl = elCloneAddr.value.split(/[?#]/)[0]; | ||||
|       repoNameFromUrl = /^(.*\/)?((.+?)\/?)$/.exec(repoNameFromUrl)[3]; | ||||
|       repoNameFromUrl = repoNameFromUrl.split(/[?#]/)[0]; | ||||
|       const parts = /^(.*\/)?((.+?)\/?)$/.exec(repoNameFromUrl); | ||||
|       if (!parts || parts.length < 4) { | ||||
|         elRepoName.value = ''; | ||||
|         return; | ||||
|       } | ||||
|       repoNameFromUrl = parts[3].split(/[?#]/)[0]; | ||||
|       elRepoName.value = sanitizeRepoName(repoNameFromUrl); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user