whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: extract names from Appoint resolutions
Date Sun, 16 Jun 2019 13:10:16 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new 1cd4146  extract names from Appoint resolutions
1cd4146 is described below

commit 1cd4146988fbfbf776b4322b6179cb64c1dcd40c
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Jun 16 09:09:53 2019 -0400

    extract names from Appoint resolutions
---
 lib/whimsy/asf/agenda/special.rb | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lib/whimsy/asf/agenda/special.rb b/lib/whimsy/asf/agenda/special.rb
index 068f0c8..b8b933f 100644
--- a/lib/whimsy/asf/agenda/special.rb
+++ b/lib/whimsy/asf/agenda/special.rb
@@ -152,6 +152,23 @@ class ASF::Board::Agenda
         else
           attrs['warnings'] ||= ['Chair not found in resolution'] 
         end
+
+      elsif title =~ /^Appoint /
+        if text =~ /FURTHER\s+RESOLVED, that\s+([^,]*?),?\s+be\b/i
+          chairname = $1.gsub(/\s+/, ' ').strip
+          chair = ASF.search_one(ASF::Person.base, "cn=#{chairname}")
+          attrs['chairname'] = chairname
+          attrs['chair'] = chair.first['uid'].first if chair.length == 1
+        end
+
+        if attrs['chair']
+          people = [[chairname, attrs['chair']]]
+        elsif chairname
+          attrs['warnings'] ||= 
+            ["#{chairname.inspect} doesn't match public name"]
+        else
+          attrs['warnings'] ||= ['Officer name not found']
+        end
       end
 
       people.map! do |name, id| 


Mime
View raw message