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 2022/02/10 14:20:23 UTC

[whimsy] branch master updated: Remove the <> wrapper

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 79edede  Remove the <> wrapper
79edede is described below

commit 79ededeea28e27b6f66c8b4aa9037103793bd4ea
Author: Sebb <se...@apache.org>
AuthorDate: Thu Feb 10 14:20:17 2022 +0000

    Remove the <> wrapper
---
 lib/whimsy/asf/member-files.rb | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/member-files.rb b/lib/whimsy/asf/member-files.rb
index 109c123..0f363e1 100644
--- a/lib/whimsy/asf/member-files.rb
+++ b/lib/whimsy/asf/member-files.rb
@@ -66,9 +66,14 @@ module ASF
     def self.member_nominees
       nominees = {}
       ASF::MemberFiles.parse_file('nominated-members.txt') do |hdr, nominee|
-        # for members, the header SHOULD look like this:
-        # availid '<'PUBLIC NAME'>'
-        id, nominee['Public Name'] = hdr.split(' ', 2)
+        # for members, the header currently looks like this:
+        # availid <PUBLIC NAME>
+        # In the past, it has had other layouts, for example:
+        # availid PUBLIC NAME
+        # PUBLIC NAME <email address>:
+        id, name = hdr.split(' ', 2)
+        # remove the spurious <> wrapper
+        nominee['Public Name'] = name.sub(%r{^<}, '').chomp('>')
         # TODO: handle missing availid better
         nominees[id] = nominee
       end