Partial backport #16356 Whilst looking at adding migration support for onedev it has become apparent that gitea would attempt to pull patches on other migration targets even if that PatchURL was empty.
This commit is contained in:
		
							parent
							
								
									86861ee135
								
							
						
					
					
						commit
						62315ea731
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -555,6 +555,9 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR | ||||||
| 
 | 
 | ||||||
| 	// download patch file
 | 	// download patch file
 | ||||||
| 	err := func() error { | 	err := func() error { | ||||||
|  | 		if pr.PatchURL == "" { | ||||||
|  | 			return nil | ||||||
|  | 		} | ||||||
| 		// pr.PatchURL maybe a local file
 | 		// pr.PatchURL maybe a local file
 | ||||||
| 		ret, err := uri.Open(pr.PatchURL) | 		ret, err := uri.Open(pr.PatchURL) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue