We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57fa9b0 commit 03fa2ecCopy full SHA for 03fa2ec
services/pull/pull.go
@@ -556,7 +556,8 @@ func GetCommitMessages(pr *models.PullRequest) string {
556
authorsMap := map[string]bool{}
557
authors := make([]string, 0, list.Len())
558
stringBuilder := strings.Builder{}
559
- element := list.Front()
+ // commits list is in reverse chronological order
560
+ element := list.Back()
561
for element != nil {
562
commit := element.Value.(*git.Commit)
563
@@ -581,7 +582,7 @@ func GetCommitMessages(pr *models.PullRequest) string {
581
582
authors = append(authors, authorString)
583
authorsMap[authorString] = true
584
}
- element = element.Next()
585
+ element = element.Prev()
586
587
588
// Consider collecting the remaining authors
0 commit comments