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 9bf348f Support generation of attic info
9bf348f is described below
commit 9bf348fc7302fd901d7e8f927c86510769f4edca
Author: Sebb <[email protected]>
AuthorDate: Thu Feb 25 12:35:26 2021 +0000
Support generation of attic info
---
www/roster/public_committee_info.rb | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/www/roster/public_committee_info.rb
b/www/roster/public_committee_info.rb
index b680ace..70cf7d1 100644
--- a/www/roster/public_committee_info.rb
+++ b/www/roster/public_committee_info.rb
@@ -30,6 +30,16 @@
# "pmc": true
# },
+# If a second parameter is provided, also creates attic 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"
+# },
+
require_relative 'public_json_common'
require 'whimsy/asf/board'
@@ -141,3 +151,30 @@ if changed? and @old_file
}
end
+
+# do we awant attic info?
+if ARGV.length >= 2
+ ARGV.shift # we have already used this
+
+ metadata = ASF::Committee.load_committee_metadata[:tlps]
+
+ # reformat the data
+ attic = {last_updated: ASF::Committee.meta_change}
+
+ data = {}
+
+ metadata.each do |key, value|
+ retired = value[:retired]
+ if retired
+ data[key] = {
+ display_name: value[:name],
+ retired: retired
+ }
+ data[key][:description] = value[:description] if value[:description]
+ end
+ end
+
+ attic[:retired] = data
+
+ public_json_output(attic) # uses first ARGV entry
+end