This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 985fb08  +=roster_count
985fb08 is described below

commit 985fb08cb034f59aa1683343ac9a1a0cb65c793c
Author: Sebb <[email protected]>
AuthorDate: Fri Sep 10 12:10:02 2021 +0100

    +=roster_count
---
 www/roster/public_ldap_roles.rb | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/www/roster/public_ldap_roles.rb b/www/roster/public_ldap_roles.rb
index 02850de..bcf51c5 100644
--- a/www/roster/public_ldap_roles.rb
+++ b/www/roster/public_ldap_roles.rb
@@ -5,6 +5,7 @@
 #   "rolegroups": {
 #     "committers": {
 #       "modifyTimestamp": "20111204095436Z",
+#       "roster_count": 1234,
 #       "roster": ["uid",
 #       ...
 #       ]
@@ -27,19 +28,20 @@ if groups.empty?
 end
 
 lastStamp = ''
-groups.keys.sort_by {|a| a.name}.each do |entry|
-    next if entry.name == 'apldap' # infra team would prefer this not be 
publicized
+groups.keys.sort_by(&:name).each do |entry|
+  next if entry.name == 'apldap' # infra team would prefer this not be 
publicized
 
-    m = []
-    entry.members.sort_by {|a| a.name}.each do |e|
-        m << e.name
-    end
-    lastStamp = entry.modifyTimestamp if entry.modifyTimestamp > lastStamp
-    entries[entry.name] = {
-        createTimestamp: entry.createTimestamp,
-        modifyTimestamp: entry.modifyTimestamp,
-        roster: m
-    }
+  m = []
+  entry.members.sort_by {|a| a.name}.each do |e|
+    m << e.name
+  end
+  lastStamp = entry.modifyTimestamp if entry.modifyTimestamp > lastStamp
+  entries[entry.name] = {
+    createTimestamp: entry.createTimestamp,
+    modifyTimestamp: entry.modifyTimestamp,
+    roster_count: m.size,
+    roster: m
+  }
 end
 
 info = {

Reply via email to