When using API CreateRelease set created_unix to the tag commit time (#11218)

pull/11204/head^2
Jason Duan 5 years ago committed by GitHub
parent d0e7361bd9
commit 4468b0b2b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      services/release/release.go

@ -53,7 +53,7 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
} }
rel.Sha1 = commit.ID.String() rel.Sha1 = commit.ID.String()
rel.CreatedUnix = timeutil.TimeStamp(commit.Author.When.Unix()) rel.CreatedUnix = timeutil.TimeStampNow()
rel.NumCommits, err = commit.CommitsCount() rel.NumCommits, err = commit.CommitsCount()
if err != nil { if err != nil {
return fmt.Errorf("CommitsCount: %v", err) return fmt.Errorf("CommitsCount: %v", err)

Loading…
Cancel
Save