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 2018/05/23 00:00:15 UTC
[whimsy] branch master updated: determine if minutes were approved
based on captured minutes
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 19e2f49 determine if minutes were approved based on captured minutes
19e2f49 is described below
commit 19e2f49c8bc8226140064e21ea3be43b73ffd3a8
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue May 22 19:59:48 2018 -0400
determine if minutes were approved based on captured minutes
---
www/board/agenda/views/committers_report.text.rb | 33 ++++++++++++++++--------
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index b6df9a7..da796cf 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -52,25 +52,29 @@ end
# extract date of the meeting
date = Time.at(agenda[0]['timestamp']/1000)
+# get list of minutes
+approved_minutes = Array.new
+other_minutes = Array.new
+agenda.each do |item|
+ next unless item[:attach] =~ /^3[A-Z]/
+ month = item['title'].split(' ').first
+ if minutes[item['title']] == 'approved'
+ approved_minutes << month
+ else
+ other_minutes << "The #{month} minutes were #{minutes[item['title']]}."
+ end
+end
+
##### Parse the agenda to find the data items above
# Data items from agenda
-minutes = Array.new
resolutions = Array.new
# State variables
parsing_resolutions = false
-parsing_attachment = nil
-current_attachment = nil
File.open(agenda_file).each do |line|
- # 4: Get the list of listed minutes
- if line =~ /[A-Z]\. The meeting of (\w*) \d\d?, \d{4}$/
- minutes << $1
- next
- end
-
# 5: Get the list of resolutions
if line =~ /\d. Special Orders/
parsing_resolutions = true
@@ -129,11 +133,17 @@ end
t_directors = attendance[:director].join(", ")
t_officers = attendance[:officer].join(", ")
t_guests = attendance[:guest].join(", ")
-if !minutes.empty?
- t_minutes = "\nThe " + minutes.join(", ").sub(/, ([^,]*)$/, ' and \1') + " minutes were " + (minutes.length > 1 ? "all " : "") + "approved. \nMinutes will be posted to http://www.apache.org/foundation/records/minutes/\n"
+
+if !approved_minutes.empty?
+ t_minutes = "\nThe " + approved_minutes.join(", ").sub(/, ([^,]*)$/, ' and \1') + " minutes were " + (approved_minutes.length > 1 ? "all " : "") + "approved. \nMinutes will be posted to http://www.apache.org/foundation/records/minutes/\n"
else
t_minutes = ""
end
+
+if !other_minutes.empty?
+ t_minutes += other_minutes.join("\n") + "\n"
+end
+
if !missing_reports.empty?
t_missing_reports = "The following reports were not received and are expected next month: \n\n "
t_missing_reports += missing_reports.join("\n ")
@@ -141,6 +151,7 @@ if !missing_reports.empty?
else
t_missing_reports = ""
end
+
if !resolutions.empty?
t_resolutions = "The following resolutions were passed unanimously: \n\n"
resolutions.each() do |resolution|
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.