1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 04:28:21 +00:00

Sync releases table with tags on push and for mirrors (#2459) (#2554)

* Sync releases table with tags on push and for mirrors

* Code style fixes

* Fix api to return only releases

* Optimize release creation and update
Minimize posibility of race conditions

* Fix release lower tag name updating

* handle tag reference update by addionally comparing commit id
This commit is contained in:
Lauris BH
2017-09-21 01:08:22 +03:00
committed by GitHub
parent 25e71ad41e
commit e232c49b10
10 changed files with 370 additions and 122 deletions

View File

@@ -912,6 +912,10 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
if headBranch != nil {
repo.DefaultBranch = headBranch.Name
}
if err = SyncReleasesWithTags(repo, gitRepo); err != nil {
log.Error(4, "Failed to synchronize tags to releases for repository: %v", err)
}
}
if err = repo.UpdateSize(); err != nil {