Merge pull request 'fix: support www.github.com for migrations' (#5795) from viceice/fix/github-migration into forgejo
		
	Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5795 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
		
				commit
				
					
						cea08caea3
					
				
			
		
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -45,6 +45,11 @@ func (f *GithubDownloaderV3Factory) New(ctx context.Context, opts base.MigrateOp
 | 
			
		|||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// some users are using the github redirect url for migration
 | 
			
		||||
	if u.Host == "www.github.com" {
 | 
			
		||||
		u.Host = "github.com"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	baseURL := u.Scheme + "://" + u.Host
 | 
			
		||||
	fields := strings.Split(u.Path, "/")
 | 
			
		||||
	oldOwner := fields[1]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue