From e6f0611ee3f5567f49d333a9a1b4bef51238636e Mon Sep 17 00:00:00 2001 From: elee Date: Thu, 3 Mar 2022 23:41:28 -0600 Subject: [PATCH] added sort --- internal/gitsources/gitlab/gitlab.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/gitsources/gitlab/gitlab.go b/internal/gitsources/gitlab/gitlab.go index cac08ff..2e1d530 100644 --- a/internal/gitsources/gitlab/gitlab.go +++ b/internal/gitsources/gitlab/gitlab.go @@ -22,6 +22,7 @@ import ( "net" "net/http" "regexp" + "sort" "strconv" "strings" "time" @@ -317,6 +318,12 @@ func (c *Client) listUserRepos(fromOptions gitlab.ListProjectsOptions) ([]*gitso } } + sort.Slice(repos, func(i, j int) bool { + a := repos[i] + b := repos[j] + return a.Path < b.Path + }) + return repos, nil }