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/02 16:40:27 UTC
[whimsy] branch master updated: extract officer information from
committee-info.txt
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 9ba7a1b extract officer information from committee-info.txt
9ba7a1b is described below
commit 9ba7a1b6dbf0c6d47f29558ae455f693f8d64629
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed May 2 12:40:09 2018 -0400
extract officer information from committee-info.txt
---
lib/whimsy/asf/committee.rb | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 03d50de..6346b5d 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -346,8 +346,9 @@ module ASF
# Extract the text before first entry in section 3 and split on section headers,
# keeping sections 1 (COMMITTEES) and 2 (REPORTING).
head, report = info.shift.split(/^\d\./)[1..2]
- # Drop lines which could match group entries
- head.gsub! /^\s+NAME\s+CHAIR\s*$/,'' # otherwise could match an entry with no e-mail
+ # Drop lines which could match group headers
+ head.gsub! /^\s+NAME\s+CHAIR\s*$/,''
+ head.gsub! /^\s+Office\s+Officer\s*$/i,''
# extract the committee chairs (e-mail address is required here)
# Note: this includes the non-PMC entries
@@ -364,6 +365,12 @@ module ASF
scan(/^[ \t]+(\w.*?)(?:[ \t][ \t]|[ \t]?$)/).flatten.uniq.
map {|name| list[name]}
+ # Extract officers
+ # first drop leading text so we only match officers
+ @officers = head.sub(/.*?also has .* Officers/m,'').
+ scan(/^[ \t]+(\w.*?)(?:[ \t][ \t]|[ \t]?$)/).flatten.uniq.
+ map {|name| list[name]}
+
# for each committee in section 3
info.each do |roster|
# extract the committee name (and parenthesised comment if any)
@@ -428,6 +435,14 @@ module ASF
@nonpmcs
end
+ # return a list of officers. Data is obtained from
+ # <tt>committee-info.txt</tt>. Note that these entries are returned
+ # as instances of ASF::Committee with display_name being the name of
+ # the office, and chairs being the individuals who hold that office.
+ def self.officers
+ @officers
+ end
+
# Finds a committee based on the name of the Committee. Is aware of
# a number of aliases for a given committee. Will set display name
# if the name being searched on contains an uppercase character.
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.