Commit a7493065c530ce86c9a4f1d22531227882b59ef7

Thomas de Grivel 2022-06-14T18:28:59

sort repos in org

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/kmxgit_web/controllers/slug_controller.ex b/lib/kmxgit_web/controllers/slug_controller.ex
index 0ad9061..a7806db 100644
--- a/lib/kmxgit_web/controllers/slug_controller.ex
+++ b/lib/kmxgit_web/controllers/slug_controller.ex
@@ -39,6 +39,9 @@ defmodule KmxgitWeb.SlugController do
           |> Enum.filter(fn repo ->
             repo.public_access || Repository.member?(repo, current_user)
           end)
+          |> Enum.sort(fn a, b ->
+            a.slug < b.slug
+          end)
           conn
           |> assign(:current_organisation, org)
           |> assign(:disk_usage, Organisation.disk_usage(org))