1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Use chronological commit order in default squash message (#13661) (#13696)

This commit is contained in:
Jimmy Praet 2020-11-25 21:08:17 +01:00 committed by GitHub
parent 57fa9b0f25
commit 03fa2eccbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -556,7 +556,8 @@ func GetCommitMessages(pr *models.PullRequest) string {
authorsMap := map[string]bool{}
authors := make([]string, 0, list.Len())
stringBuilder := strings.Builder{}
element := list.Front()
// commits list is in reverse chronological order
element := list.Back()
for element != nil {
commit := element.Value.(*git.Commit)
@ -581,7 +582,7 @@ func GetCommitMessages(pr *models.PullRequest) string {
authors = append(authors, authorString)
authorsMap[authorString] = true
}
element = element.Next()
element = element.Prev()
}
// Consider collecting the remaining authors