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 chair's id from parens, if present
Date Tue, 19 Apr 2016 12:00:59 GMT
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 <rubys@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" <commits@whimsical.apache.org>'].

Mime
View raw message