mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
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>
This commit is contained in:
parent
0f99edf123
commit
8c086bae6e
@ -63,10 +63,12 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
|
|||||||
return fmt.Errorf("CommitsCount: %v", err)
|
return fmt.Errorf("CommitsCount: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rel.PublisherID <= 0 {
|
||||||
u, err := models.GetUserByEmail(commit.Author.Email)
|
u, err := models.GetUserByEmail(commit.Author.Email)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
rel.PublisherID = u.ID
|
rel.PublisherID = u.ID
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
rel.CreatedUnix = timeutil.TimeStampNow()
|
rel.CreatedUnix = timeutil.TimeStampNow()
|
||||||
|
Loading…
Reference in New Issue
Block a user