diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/mirror/mirror.go | 3 | ||||
-rw-r--r-- | services/mirror/mirror_test.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/services/mirror/mirror.go b/services/mirror/mirror.go index 9c52f1723b..1ad9448b6b 100644 --- a/services/mirror/mirror.go +++ b/services/mirror/mirror.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/sync" "code.gitea.io/gitea/modules/timeutil" @@ -207,7 +208,7 @@ func runSync(m *models.Mirror) ([]*mirrorSyncResult, bool) { log.Error("OpenRepository: %v", err) return nil, false } - if err = models.SyncReleasesWithTags(m.Repo, gitRepo); err != nil { + if err = repository.SyncReleasesWithTags(m.Repo, gitRepo); err != nil { gitRepo.Close() log.Error("Failed to synchronize tags to releases for repository: %v", err) } diff --git a/services/mirror/mirror_test.go b/services/mirror/mirror_test.go index 81811ffe4a..816ef230fd 100644 --- a/services/mirror/mirror_test.go +++ b/services/mirror/mirror_test.go @@ -10,6 +10,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/structs" release_service "code.gitea.io/gitea/services/release" @@ -46,7 +47,7 @@ func TestRelease_MirrorDelete(t *testing.T) { }) assert.NoError(t, err) - mirror, err := models.MigrateRepositoryGitData(user, user, mirrorRepo, opts) + mirror, err := repository.MigrateRepositoryGitData(user, user, mirrorRepo, opts) assert.NoError(t, err) gitRepo, err := git.OpenRepository(repoPath) |