diff options
author | sebastian-sauer <sauer.sebastian@gmail.com> | 2024-04-05 02:51:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 00:51:53 +0000 |
commit | 07bcfc171bcccfe78a86c7b4b3f9b729ba7d60b6 (patch) | |
tree | 0162089d8c028e84bb60c533862ce344050521b3 | |
parent | 83c5072077f34e6e108b12559b5aef2ae2de5a22 (diff) | |
download | gitea-07bcfc171bcccfe78a86c7b4b3f9b729ba7d60b6.tar.gz gitea-07bcfc171bcccfe78a86c7b4b3f9b729ba7d60b6.zip |
Commit-Dropdown: Show Author of commit if available (#30272)
As in commits page we show the author of the commit in the commits
dropdown and not the committer.
Commits Page:

and the same contents in our dropdown:

fixes #29588
-rw-r--r-- | services/pull/pull.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/pull/pull.go b/services/pull/pull.go index c091b8608a..185a1895c9 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -989,12 +989,12 @@ func GetPullCommits(ctx *gitea_context.Context, issue *issues_model.Issue) ([]Co for _, commit := range prInfo.Commits { var committerOrAuthorName string var commitTime time.Time - if commit.Committer != nil { - committerOrAuthorName = commit.Committer.Name - commitTime = commit.Committer.When - } else { + if commit.Author != nil { committerOrAuthorName = commit.Author.Name commitTime = commit.Author.When + } else { + committerOrAuthorName = commit.Committer.Name + commitTime = commit.Committer.When } commits = append(commits, CommitInfo{ |