whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject [whimsy] branch roster-emeritus updated: add emeritus files and emeritus-request files to member info
Date Tue, 12 May 2020 23:29:55 GMT
This is an automated email from the ASF dual-hosted git repository.

clr pushed a commit to branch roster-emeritus
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/roster-emeritus by this push:
     new 20eaf9c  add emeritus files and emeritus-request files to member info
20eaf9c is described below

commit 20eaf9c4089f12e1c75fc83fcd13ac68a9f4bbfe
Author: Craig L Russell <craig.russell@oracle.com>
AuthorDate: Tue May 12 16:29:18 2020 -0700

    add emeritus files and emeritus-request files to member info
---
 lib/whimsy/asf/documents.rb    | 27 +++++++++++++++++++++++++++
 www/roster/models/committer.rb |  7 +++++++
 2 files changed, 34 insertions(+)

diff --git a/lib/whimsy/asf/documents.rb b/lib/whimsy/asf/documents.rb
index 77a27bf..c4293d6 100644
--- a/lib/whimsy/asf/documents.rb
+++ b/lib/whimsy/asf/documents.rb
@@ -107,6 +107,33 @@ module ASF
       _, list = ASF::SVN.getlisting('emeritus-requests-received')
       list
     end
+
+    def self.find(name)
+      files = self.listnames
+      if files
+        stem = name.downcase.gsub(' ','-')
+        files.each do |file|
+          break file if file =~ stem
+        end
+      end
+    end
+  end
+
+  class EmeritusFiles
+    def self.listnames
+      _, list = ASF::SVN.getlisting('emeritus')
+      list
+    end
+
+    def self.find(name)
+      files = self.listnames
+      if files
+        stem = name.downcase.gsub(' ','-')
+        files.each do |file|
+          break file if file =~ stem
+        end
+      end
+    end
   end
 
 end
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index be2c3fe..ce88675 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -140,6 +140,13 @@ class Committer
           file = ASF::MemApps.find1st(person)
           response[:forms][:member] = file if file 
         end
+
+        file = ASF::EmeritusFiles.find(person.name)
+        response[:forms][:emeritus] = file if file
+
+        file = ASF::EmeritusRequestFiles.find(person.name)
+        response[:forms][:emeritus-request] = file if file
+
       else
         if person.member_nomination
           member[:nomination] = person.member_nomination


Mime
View raw message