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 3bfc457  Don't use committee-info.yaml for canonicalisation
3bfc457 is described below

commit 3bfc4577d303217d1425bfe71228d4aaeca47287
Author: Sebb <[email protected]>
AuthorDate: Thu Oct 22 02:02:39 2020 +0100

    Don't use committee-info.yaml for canonicalisation
---
 lib/spec/lib/committee_spec.rb |  2 +-
 lib/whimsy/asf/committee.rb    | 13 ++++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/spec/lib/committee_spec.rb b/lib/spec/lib/committee_spec.rb
index 7f40d5b..d786fd2 100644
--- a/lib/spec/lib/committee_spec.rb
+++ b/lib/spec/lib/committee_spec.rb
@@ -103,7 +103,7 @@ describe ASF::Committee do
       expect(para[:retired]).to eql(nil)
     end
     it "should add retired tag to HTTPD" do
-      data = ASF::Committee.record_termination(data, 'httpd', yyyymm)
+      data = ASF::Committee.record_termination(data, 'HTTP Server', yyyymm)
       yaml = YAML.safe_load(data, [Symbol])
       para = yaml[:tlps]['httpd']
       expect(para).not_to eql(nil)
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 785f153..8bb3ae7 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -65,6 +65,7 @@ module ASF
     # See also www/roster/committee.cgi
     @@aliases = Hash.new { |_hash, name| name.downcase}
     @@aliases.merge! \
+      'brand management'               => 'brand',
       'c++ standard library'           => 'stdcxx',
       'community development'          => 'comdev',
       # TODO: are the concom entries correct? See INFRA-17782
@@ -76,9 +77,11 @@ module ASF
       'httpserver'                     => 'httpd',
       'incubating'                     => 'incubator', # special for index.html
       'java community process'         => 'jcp',
+      'legal affairs'                  => 'legal',
       'logging services'               => 'logging',
       'lucene.net'                     => 'lucenenet',
       'open climate workbench'         => 'climate',
+      'ocw'                            => 'climate', # is OCW used?
       'portable runtime'               => 'apr',
       'quetzalcoatl'                   => 'quetz',
       'security team'                  => 'security',
@@ -93,6 +96,11 @@ module ASF
       cname
     end
 
+    # convert committee name to canonical name
+    def self.to_canonical(name)
+      @@namemap.call(name.downcase)
+    end
+
     # load committee info from <tt>committee-info.txt</tt>.  Will not reparse
     # if the file has already been parsed and the underlying file has not
     # changed.
@@ -277,9 +285,8 @@ module ASF
     # - yyyymm: YYYY-MM retirement date
     #  Returns: the updated contents
     def self.record_termination(input, pmc, yyyymm)
-      YamlFile.replace_section(input, :tlps) do |section, yaml|
-        key = pmc.downcase.strip
-        key = yaml[:name2id][key] || key
+      YamlFile.replace_section(input, :tlps) do |section, _yaml|
+        key = ASF::Committee.to_canonical(pmc)
         if section[key]
           section[key][:retired] = yyyymm
         else

Reply via email to