Fix wrong publisher id (#14212)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
tokarchuk/v1.17
Lunny Xiao 4 years ago committed by GitHub
parent 0f99edf123
commit 8c086bae6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      services/release/release.go

@ -63,10 +63,12 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
return fmt.Errorf("CommitsCount: %v", err)
}
if rel.PublisherID <= 0 {
u, err := models.GetUserByEmail(commit.Author.Email)
if err == nil {
rel.PublisherID = u.ID
}
}
} else {
rel.CreatedUnix = timeutil.TimeStampNow()

Loading…
Cancel
Save