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: Capture the non-pmc types
Date Sun, 06 Oct 2019 23:08:54 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 4136ab6  Capture the non-pmc types
4136ab6 is described below

commit 4136ab6e9eb1fd1026899ce0783f34db4ec2adb9
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Oct 7 00:07:49 2019 +0100

    Capture the non-pmc types
---
 lib/whimsy/asf/committee.rb | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index dac99b6..d7b2e56 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -21,6 +21,9 @@ module ASF
   # generally not available until ASF::Project.preload is called.
 
   class Committee < Base
+    # type of non-pmc entry (from its paragraph heading in committee-info.txt)
+    attr_accessor :paragraph
+
     # list of chairs for this committee.  Returned as a list of hashes
     # containing the <tt>:name</tt> and <tt>:id</tt>.  Data is obtained
from
     # <tt>committee-info.txt</tt>.
@@ -424,6 +427,16 @@ module ASF
         scan(/^[ \t]+(\w.*?)(?:[ \t][ \t]|[ \t]?$)/).flatten.uniq.
         map {|name| list[name]}
 
+      # store the paragraph identifiers: Board Committees etc
+      head_parts = head.split(/^The ASF also has the following +/)
+      (1..head_parts.size-1).each do |h| # skip the first section
+        part = head_parts[h]
+        type = part[/^([^:]+)/,1] # capture remains of line excluding colon
+        part.scan(/^[ \t]+(\w.*?)(?:[ \t][ \t]|[ \t]?$)/).flatten.uniq.each do |cttee|
+            list[cttee].paragraph = type
+          end
+      end
+
       # for each committee in section 3
       info.each do |roster|
         # extract the committee name (and parenthesised comment if any)


Mime
View raw message