repo commits are sorted by default, stub out paginator

This commit is contained in:
2023-02-18 18:12:45 -08:00
parent ecc3163d28
commit 902266ede7
2 changed files with 35 additions and 7 deletions

View File

@@ -94,6 +94,11 @@ func (paths RepoSet) GetRepoCommits(year int, authors []string) ([][]types.Commi
d := commit.TimeStamp.YearDay() - 1
commits[d] = append(commits[d], commit)
}
for i := 0; i < len(commits); i++ {
sort.Slice(commits[i], func(w, j int) bool {
return commits[i][w].TimeStamp.Before(commits[i][j].TimeStamp)
})
}
CacheRepos(year, authors, paths, commits)
return commits, nil
}