You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/10/22 14:45:32 UTC
[whimsy] branch master updated: Extract project charter from
Establish motions
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 <se...@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