mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 10:54:25 +02:00
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
This commit is contained in:
1 parent
83c5072077
commit
07bcfc171b
1 file changed
+4
-4
@@ -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{
|
||||
|
||||
Reference in new issue
Block a user