mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
Backport #30272 by @sebastian-sauer 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 Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
This commit is contained in:
parent
db214817f8
commit
c8570b73af
@ -989,12 +989,12 @@ func GetPullCommits(ctx *gitea_context.Context, issue *issues_model.Issue) ([]Co
|
|||||||
for _, commit := range prInfo.Commits {
|
for _, commit := range prInfo.Commits {
|
||||||
var committerOrAuthorName string
|
var committerOrAuthorName string
|
||||||
var commitTime time.Time
|
var commitTime time.Time
|
||||||
if commit.Committer != nil {
|
if commit.Author != nil {
|
||||||
committerOrAuthorName = commit.Committer.Name
|
|
||||||
commitTime = commit.Committer.When
|
|
||||||
} else {
|
|
||||||
committerOrAuthorName = commit.Author.Name
|
committerOrAuthorName = commit.Author.Name
|
||||||
commitTime = commit.Author.When
|
commitTime = commit.Author.When
|
||||||
|
} else {
|
||||||
|
committerOrAuthorName = commit.Committer.Name
|
||||||
|
commitTime = commit.Committer.When
|
||||||
}
|
}
|
||||||
|
|
||||||
commits = append(commits, CommitInfo{
|
commits = append(commits, CommitInfo{
|
||||||
|
Loading…
Reference in New Issue
Block a user