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 da01284f Add tests for secretary and treasurer
da01284f is described below

commit da01284f9bb0e1f121499d1f021872626468492d
Author: Sebb <[email protected]>
AuthorDate: Tue Apr 18 20:04:40 2023 +0100

    Add tests for secretary and treasurer
---
 lib/whimsy/asf/person.rb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/whimsy/asf/person.rb b/lib/whimsy/asf/person.rb
index df357d9b..0cde27e0 100644
--- a/lib/whimsy/asf/person.rb
+++ b/lib/whimsy/asf/person.rb
@@ -283,5 +283,15 @@ module ASF
     def asf_member_status
       ASF::Member.member_status name
     end
+
+    # Is this person in the secretary team?
+    def secretary?
+      ASF::Service.find('asf-secretary').members.include? self
+    end
+
+    # Is this person in the treasurer team?
+    def treasurer?
+      ASF::AuthGroup.find('treasurer').members.include? self
+    end
   end
 end

Reply via email to