Skip to content

Commit 62315ea

Browse files
authored
If PatchURL is empty, skip pull patch download when migrating (Partial #16356) (#16681)
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.
1 parent 86861ee commit 62315ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/migrations/gitea_uploader.go

+3
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,9 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR
555555

556556
// download patch file
557557
err := func() error {
558+
if pr.PatchURL == "" {
559+
return nil
560+
}
558561
// pr.PatchURL maybe a local file
559562
ret, err := uri.Open(pr.PatchURL)
560563
if err != nil {

0 commit comments

Comments
 (0)