mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Backport #34703 by @lunny Fix #34688 This PR will store the `publisher_id` of `release`(tag) table as pusher's id. It could be a real userID or a system user id. If the user is deleted, ghost will be replaced. This PR will also correct the wrong user `Ghost` in the feeds and wrong committer on tag list page if pushing a tag from an actions. Now the behavior is the same as Github. Some codes are deleted because it tries to get commit author as pusher which is not right. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -103,7 +103,7 @@ func getReleaseInfos(ctx *context.Context, opts *repo_model.FindReleasesOptions)
|
||||
releaseInfos := make([]*ReleaseInfo, 0, len(releases))
|
||||
for _, r := range releases {
|
||||
if r.Publisher, ok = cacheUsers[r.PublisherID]; !ok {
|
||||
r.Publisher, err = user_model.GetUserByID(ctx, r.PublisherID)
|
||||
r.Publisher, err = user_model.GetPossibleUserByID(ctx, r.PublisherID)
|
||||
if err != nil {
|
||||
if user_model.IsErrUserNotExist(err) {
|
||||
r.Publisher = user_model.NewGhostUser()
|
||||
|
Reference in New Issue
Block a user