whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Extract project charter from Establish motions
Date Tue, 22 Oct 2019 14:45:32 GMT
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 51ec605  Extract project charter from Establish motions
51ec605 is described below

commit 51ec6056e101ba11eeff0a94af2153944ed4f241
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Oct 22 15:45:28 2019 +0100

    Extract project charter from Establish motions
---
 lib/whimsy/asf/agenda/special.rb | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/whimsy/asf/agenda/special.rb b/lib/whimsy/asf/agenda/special.rb
index 6537581..2f9f98a 100644
--- a/lib/whimsy/asf/agenda/special.rb
+++ b/lib/whimsy/asf/agenda/special.rb
@@ -124,6 +124,19 @@ class ASF::Board::Agenda
         end
 
         need_chair = true if fulltitle =~ /chair|project|committee/i
+
+        # extract the committee charter
+        charters = []
+        text.scan(%r{\srelated to\s+(.+?)(?:;|\.?\n\n)}m) do |rto|
+          charters << rto.first.gsub(/\s+/,' ') 
+        end
+        if charters.size != 2
+          attrs['warnings'] ||= "Expected 2 'related to' phrases; found #{charters.size}"
+        elsif charters[0] != charters[1]
+          attrs['warnings'] ||=  "'related to' phrases disagree: '#{charters[0]}' != '#{charters[1]}'"
+        end
+        attrs['charter'] = charters.first
+
       end
 
       if need_chair


Mime
View raw message