mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 19:23:36 +00:00 
			
		
		
		
	getFetchUrl: compose url with full service url
actions/checkout maybe used by Gitea, which allows installing the server instance in a subdirectory to the service root, therefore a full serviceUrl must be used. Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
This commit is contained in:
		
							parent
							
								
									cd7d8d697e
								
							
						
					
					
						commit
						9b92a3558d
					
				
							
								
								
									
										3
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -2402,8 +2402,7 @@ function getFetchUrl(settings) { | ||||
|     if (settings.sshKey) { | ||||
|         return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`; | ||||
|     } | ||||
|     // "origin" is SCHEME://HOSTNAME[:PORT]
 | ||||
|     return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`; | ||||
|     return `${serviceUrl}/${encodedOwner}/${encodedName}`; | ||||
| } | ||||
| exports.getFetchUrl = getFetchUrl; | ||||
| function getServerUrl(url) { | ||||
|  | ||||
| @ -15,8 +15,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string { | ||||
|     return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git` | ||||
|   } | ||||
| 
 | ||||
|   // "origin" is SCHEME://HOSTNAME[:PORT]
 | ||||
|   return `${serviceUrl.origin}/${encodedOwner}/${encodedName}` | ||||
|   return `${serviceUrl}/${encodedOwner}/${encodedName}` | ||||
| } | ||||
| 
 | ||||
| export function getServerUrl(url?: string): URL { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user