whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Extract public mailing list data
Date Thu, 25 Feb 2021 23:27:37 GMT
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 dc0455e  Extract public mailing list data
dc0455e is described below

commit dc0455eade50809ce3a86a974476c4f0fd1d701c
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Feb 25 23:27:29 2021 +0000

    Extract public mailing list data
    
    This is likely to be mainly useful for Attic
---
 www/roster/public_mlist_info.rb | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/www/roster/public_mlist_info.rb b/www/roster/public_mlist_info.rb
new file mode 100644
index 0000000..229dce1
--- /dev/null
+++ b/www/roster/public_mlist_info.rb
@@ -0,0 +1,50 @@
+# Extract public mailing list data in the form:
+#
+# {
+#   "last_updated": "2021-02-25 22:33:27 +0000",
+#   "list_data": [
+#     [
+#       "abdera.apache.org", // this was retired
+#       {
+#         "commits": false,
+#         "dev": false,
+#         "user": false
+#       }
+#     ],
+#     [
+#       "accumulo.apache.org", // active
+#       {
+#         "commits": true,
+#         "dev": true,
+#         "notifications": true,
+#         "user": true
+#       }
+#     ],
+
+
+require_relative 'public_json_common'
+require 'whimsy/asf/mlist'
+require '/srv/whimsy/tools/ponyapi'
+
+info = {
+  last_updated: Time.now,
+}
+
+data = {}
+
+# which lists are currently active
+active_lists = Set.new
+ASF::MLIST.each_list do |dom, list|
+  active_lists << [dom,list]
+end
+
+PonyAPI.get_pony_lists(nil,nil,true).each do |dom, lists|
+  data[dom] = {}
+  lists.keys.sort.each do |list|
+    data[dom][list] = active_lists.include? [dom, list]
+  end
+end
+
+info[:list_data] = data.sort # ensure only valid changes are reported
+
+public_json_output(info)


Mime
View raw message