aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/adopt.go
diff options
context:
space:
mode:
authorZettat123 <zettat123@gmail.com>2023-08-31 09:42:42 +0800
committerGitHub <noreply@github.com>2023-08-31 01:42:42 +0000
commit98f2bf23bc57d734471a08e396c687be6d194313 (patch)
treebacb105c6665995e29970c5d324a4609ea66aff2 /services/repository/adopt.go
parent4544b2a9a3cbab2d92edcc2115e8d79ba03118b0 (diff)
downloadgitea-98f2bf23bc57d734471a08e396c687be6d194313.tar.gz
gitea-98f2bf23bc57d734471a08e396c687be6d194313.zip
Sync tags when adopting repos (#26816)
Fixes #26138 Sync the tags into database when adopting repos --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'services/repository/adopt.go')
-rw-r--r--services/repository/adopt.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/repository/adopt.go b/services/repository/adopt.go
index f95fb5988f..67604fd1b4 100644
--- a/services/repository/adopt.go
+++ b/services/repository/adopt.go
@@ -195,6 +195,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
}