Skip to content

Commit 8c086ba

Browse files
lunnytechknowlogicklafrikszeripath
authored
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>
1 parent 0f99edf commit 8c086ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

services/release/release.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
6363
return fmt.Errorf("CommitsCount: %v", err)
6464
}
6565

66-
u, err := models.GetUserByEmail(commit.Author.Email)
67-
if err == nil {
68-
rel.PublisherID = u.ID
66+
if rel.PublisherID <= 0 {
67+
u, err := models.GetUserByEmail(commit.Author.Email)
68+
if err == nil {
69+
rel.PublisherID = u.ID
70+
}
6971
}
7072

7173
} else {

0 commit comments

Comments
 (0)