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 2016/04/19 14:00:59 UTC

[whimsy] branch master updated: extract chair's id from parens, if present

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

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

The following commit(s) were added to refs/heads/master by this push:
       new  8d06574   extract chair's id from parens, if present
8d06574 is described below

commit 8d0657470562c3609f9d02c05952111f694b53e2
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Apr 19 08:00:31 2016 -0400

    extract chair's id from parens, if present
---
 lib/whimsy/asf/agenda/special.rb | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/agenda/special.rb b/lib/whimsy/asf/agenda/special.rb
index 4b865f3..72061a1 100644
--- a/lib/whimsy/asf/agenda/special.rb
+++ b/lib/whimsy/asf/agenda/special.rb
@@ -87,8 +87,16 @@ class ASF::Board::Agenda
             "#{whimsy}/board/minutes/#{name.gsub(/\W/,'_')}"
           if text =~ /FURTHER RESOLVED, that\s+([^,]*?),?\s+be\b/
             chairname = $1.gsub(/\s+/, ' ').strip
-            chair = people.find {|person| person.first == chairname}
-            attrs['chair'] = (chair ? chair.last : nil)
+
+            if chairname =~ /\s\(([-.\w]+)\)$/
+              # if chair's id is present in parens, use that value
+              attrs['chair'] = $1
+            else
+              # match chair's name against people in the committee
+              chair = people.find {|person| person.first == chairname}
+              attrs['chair'] = (chair ? chair.last : nil)
+            end
+
             unless chair and chair.last
               attrs['warnings'] ||= ['Chair not found in resolution'] 
             end

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