Sync tags when adopting repos (#26816) (#26834)

Backport #26816 by @Zettat123

Fixes #26138

Sync the tags into database when adopting repos

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit 302c03c4a9e288bdbda2cd6cde29003d0d13207d)
This commit is contained in:
Giteabot 2023-08-31 10:15:28 +08:00 committed by Earl Warren
parent d5845521a8
commit 6b5ef0fad7
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -186,6 +186,10 @@ func adoptRepository(ctx context.Context, repoPath string, u *user_model.User, r
return fmt.Errorf("updateRepository: %w", err)
}
if err = repo_module.SyncReleasesWithTags(repo, gitRepo); err != nil {
return fmt.Errorf("SyncReleasesWithTags: %w", err)
}
return nil
}