diff src/lib/Shared.luan @ 4:028e74c8889d

add all_users
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 12 May 2022 16:54:11 -0600
parents dfc36e7ed22c
children
line wrap: on
line diff
--- a/src/lib/Shared.luan	Thu May 12 10:26:43 2022 -0600
+++ b/src/lib/Shared.luan	Thu May 12 16:54:11 2022 -0600
@@ -141,6 +141,19 @@
 config.private = config.private and list_to_set(config.private)
 Shared.config = config
 
+local user_repos = {}
+for _, repo in pairs(config.repos) do
+	for user in pairs(repo.users) do
+		local repos = user_repos[user]
+		if repos == nil then
+			repos = {}
+			user_repos[user] = repos
+		end
+		repos[#repos+1] = repo
+	end
+end
+Shared.user_repos = user_repos
+
 function Shared.get_raw_config()
 	return deep_copy(raw_config)
 end