You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/09/26 19:35:21 UTC

[whimsy] 01/03: use canonical PMC names, and ensure canonical PMC names don't have spaces

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

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

commit 6ff0d0239f0b0801b568824960ea964a66db369b
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Sep 26 15:33:15 2017 -0400

    use canonical PMC names, and ensure canonical PMC names don't have spaces
---
 lib/whimsy/asf/committee.rb                  |  2 +-
 www/board/agenda/views/actions/todos.json.rb | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 25a179b..1a06668 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -82,7 +82,7 @@ module ASF
       'incubating'                  => 'incubator' # special for index.html
 
     @@namemap = Proc.new do |name|
-      cname = @@aliases[name.sub(/\s+\(.*?\)/, '').downcase]
+      cname = @@aliases[name.sub(/\s+\(.*?\)/, '').downcase].gsub(/\s+/, '')
       cname
     end
 
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index 29b6bb6..d0fa783 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -237,17 +237,20 @@ change = []
 parsed_agenda.each do |item|
   next unless item[:attach] =~ /^7\w$/
   if item['title'] =~ /^Change (.*?) Chair$/ and item['people']
-    next if Array(minutes[:todos][:changed]).include? $1
-    change << {name: $1, resolution: item['title'], chair: item['chair']}
+    pmc = ASF::Committee.find($1).id
+    next if Array(minutes[:todos][:changed]).include? pmc
+    change << {name: pmc, resolution: item['title'], chair: item['chair']}
     item['people'].keys.each do |person|
       transitioning[ASF::Person.find(person)] = item['title']
     end
   elsif item['title'] =~ /^Establish\s*(.*?)\s*$/ and item['chair']
-    next if Array(minutes[:todos][:established]).include? $1
-    establish << {name: $1, resolution: item['title'], chair: item['chair']}
+    pmc = ASF::Committee.find(pmc).id
+    next if Array(minutes[:todos][:established]).include? pmc
+    establish << {name: pmc, resolution: item['title'], chair: item['chair']}
     transitioning[ASF::Person.find(item['chair'])] = item['title']
   elsif item['title'] =~ /^Terminate\s*(.*?)\s*$/
-    next if Array(minutes[:todos][:terminated]).include? $1
+    pmc = ASF::Committee.find($1).id
+    next if Array(minutes[:todos][:terminated]).include? pmc
     terminate[$1] = item['title']
   end
 end

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.