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 2020/04/16 15:10:40 UTC

[whimsy] branch master updated: add a convenience method

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 4aa137e  add a convenience method
4aa137e is described below

commit 4aa137ef5c7097e533538557d6f53d0b078435ff
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Apr 16 11:10:11 2020 -0400

    add a convenience method
---
 lib/whimsy/asf/committee.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 047d027..a50f27a 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -518,6 +518,12 @@ module ASF
       @officers
     end
 
+    # look up an individual officer
+    def self.officer(role)
+      office = self.officers.find {|officer| officer.name == role}
+      office && ASF::Person.find(office.chairs.first[:id])
+    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.