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  f14b242   validate mentors
f14b242 is described below

commit f14b242d41e8c6082831b968e399e467d8bfc616
Author: Sam Ruby <[email protected]>
AuthorDate: Mon May 29 11:24:17 2017 -0400

    validate mentors
---
 www/roster/models/ppmc.rb           |  3 ++-
 www/roster/views/ppmc/mentors.js.rb | 11 ++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index 796f856..ad5f129 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -26,6 +26,7 @@ class PPMC
       lists = lists.select {|list, mode| mode == 'public'}
     end
 
+    ipmc = ASF::Committee.find('incubator').members
     incubator_committers = ASF::Group.find('incubator').members
 
     roster = ppmc.members.map {|person|
@@ -37,11 +38,11 @@ class PPMC
     }.to_h
 
     ppmc.mentors.each do |mentor|
-      next if roster[mentor]
       person = ASF::Person.find(mentor)
       roster[person.id] = {
         name: person.public_name, 
         member: person.asf_member?,
+        ipmc: ipmc.include?(person),
         icommit: incubator_committers.include?(person)
       }
     end
diff --git a/www/roster/views/ppmc/mentors.js.rb 
b/www/roster/views/ppmc/mentors.js.rb
index c40f42e..e18891e 100644
--- a/www/roster/views/ppmc/mentors.js.rb
+++ b/www/roster/views/ppmc/mentors.js.rb
@@ -131,9 +131,12 @@ class PPMCMentor < React
       if @@person.member
         _td { _b { _a @@person.id, href: "committer/#{@@person.id}" } }
         _td { _b @@person.name }
-      else
+      elsif @@person.name
         _td { _a @@person.id, href: "committer/#{@@person.id}" }
         _td @@person.name
+      else
+        _td @@person.id
+        _td @@person.name
       end
         
       _td data_ids: @@person.id do
@@ -167,8 +170,14 @@ class PPMCMentor < React
           end
         elsif @@person.status == :pending
           _span 'pending'
+        elsif not @@person.name
+          _span.issue 'invalid user'
         elsif not @@ppmc.owners.include? @@person.id
           _span.issue 'not on the PPMC'
+        elsif not @@person.ipmc
+          _span.issue 'not on the IPMC'
+        elsif not @@person.icommit
+          _span.issue 'not listed as an incubator committer'
         end
       end
     end

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to