diff --git a/src/core/gitea_comments.go b/src/core/gitea_comments.go index eba4fcf..d074128 100644 --- a/src/core/gitea_comments.go +++ b/src/core/gitea_comments.go @@ -51,9 +51,12 @@ func GetComments(config *Config, client *gitea.Client, prID int64) map[string]([ splitComments := make(map[string]([]*gitea.PullReviewComment)) for _, reviewID := range reviews { comments := RetrieveComments(config, client, prID, reviewID) - sort.Sort(ByLineNum(comments)) splitComments = SplitByFile(splitComments, comments) } + for _, comments := range splitComments { + sort.Sort(ByLineNum(comments)) + } + return splitComments }