]> source.dussan.org Git - gitea.git/commitdiff
Fix get tag when migration (#16014)
authorLunny Xiao <xiaolunwen@gmail.com>
Sat, 29 May 2021 20:04:58 +0000 (04:04 +0800)
committerGitHub <noreply@github.com>
Sat, 29 May 2021 20:04:58 +0000 (16:04 -0400)
Co-authored-by: zeripath <art27@cantab.net>
modules/migrations/gitea_uploader.go

index 8b865d7971522b530db2ef862f1223c2399ae94c..217acb00e2156238efee734f3a0156245da0188a 100644 (file)
@@ -252,7 +252,7 @@ func (g *GiteaLocalUploader) CreateReleases(releases ...*base.Release) error {
 
                // calc NumCommits if no draft
                if !release.Draft {
-                       commit, err := g.gitRepo.GetCommit(rel.TagName)
+                       commit, err := g.gitRepo.GetTagCommit(rel.TagName)
                        if err != nil {
                                return fmt.Errorf("GetCommit: %v", err)
                        }