Skip to content

Commit

Permalink
If PatchURL is empty, skip pull patch download when migrating (Partial
Browse files Browse the repository at this point in the history
go-gitea#16356) (go-gitea#16681)

Partial backport go-gitea#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.
  • Loading branch information
6543 authored and Gitea committed Aug 24, 2021
1 parent 530a672 commit 054cb55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/migrations/gitea_uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR

// download patch file
err := func() error {
if pr.PatchURL == "" {
return nil
}
// pr.PatchURL maybe a local file
ret, err := uri.Open(pr.PatchURL)
if err != nil {
Expand Down

0 comments on commit 054cb55

Please sign in to comment.