From 302c03c4a9e288bdbda2cd6cde29003d0d13207d Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 31 Aug 2023 10:15:28 +0800 Subject: [PATCH] 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 Co-authored-by: silverwind Co-authored-by: KN4CK3R --- services/repository/adopt.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/repository/adopt.go b/services/repository/adopt.go index e07ff350419..7ec6b243b0b 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -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 }