You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2021/02/25 18:01:26 UTC

[whimsy] branch master updated: Show active lists

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 8ab6231  Show active lists
8ab6231 is described below

commit 8ab62313096341248269c3e424367ad4be3b9f94
Author: Sebb <se...@apache.org>
AuthorDate: Thu Feb 25 18:01:18 2021 +0000

    Show active lists
---
 www/roster/public_committee_info.rb | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/www/roster/public_committee_info.rb b/www/roster/public_committee_info.rb
index 70cf7d1..b2d0f18 100644
--- a/www/roster/public_committee_info.rb
+++ b/www/roster/public_committee_info.rb
@@ -1,5 +1,5 @@
-# Creates JSON output from committee-info.txt with the following format:
 #{
+# Creates JSON output from committee-info.txt with the following format:
 #  "last_updated": "2016-03-04 04:50:00 UTC",
 #  "committees": {
 #    "abdera": {
@@ -30,14 +30,15 @@
 #      "pmc": true
 #    },
 
-# If a second parameter is provided, also creates attic info of the form:
+# If a second parameter is provided, also creates committee-retired info of the form:
 #{
 #  "last_updated": "2016-03-04 04:50:00 UTC",
 #  "retired": {
 #    "abdera": {
 #      "display_name": "Abdera",
 #      "description": "Atom Publishing Protocol Implementation",
-#      "retired": "yyyy-mm"
+#      "retired": "yyyy-mm".
+#      "mlists": ["dev", "user", ...] // lists not yet shut down
 #    },
 
 require_relative 'public_json_common'
@@ -155,9 +156,15 @@ end
 # do we awant attic info?
 if ARGV.length >= 2
   ARGV.shift # we have already used this
+  require 'whimsy/asf/mlist'
   
   metadata = ASF::Committee.load_committee_metadata[:tlps]
 
+  public_lists = Hash.new {|h,k| h[k]=Array.new}
+  ASF::MLIST.list_types do |dom, list, _|
+    public_lists[dom.sub(/\.apache\.org$/, '')] << list
+  end
+
   # reformat the data
   attic = {last_updated: ASF::Committee.meta_change}
   
@@ -171,9 +178,13 @@ if ARGV.length >= 2
         retired: retired
       }
       data[key][:description] = value[:description] if value[:description]
+      mlists = public_lists[key]
+      if mlists.size > 0
+        data[key][:mlists] = mlists
+      end
     end
   end
-  
+
   attic[:retired] = data
   
   public_json_output(attic) # uses first ARGV entry