whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Whimsy-207 Show Github username on Roster Tables
Date Thu, 25 Oct 2018 19:59:48 GMT
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 a0e027b  Whimsy-207 Show Github username on Roster Tables
a0e027b is described below

commit a0e027b1b13a32acff40a0b0374d7467ce9c8a2a
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Oct 25 20:58:41 2018 +0100

    Whimsy-207 Show Github username on Roster Tables
---
 www/roster/models/committee.rb         | 4 +++-
 www/roster/models/ppmc.rb              | 6 ++++--
 www/roster/views/pmc/committers.js.rb  | 3 +++
 www/roster/views/pmc/pmc.js.rb         | 3 +++
 www/roster/views/ppmc/committers.js.rb | 3 +++
 www/roster/views/ppmc/members.js.rb    | 3 +++
 www/roster/views/ppmc/mentors.js.rb    | 4 ++++
 7 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index f7c27d1..4d4a790 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -9,7 +9,7 @@ class Committee
 
     ASF::Committee.load_committee_info
     # We'll be needing the mail data later
-    people = ASF::Person.preload(['cn', 'mail', 'asf-altEmail'], (members + committers).uniq)
+    people = ASF::Person.preload(['cn', 'mail', 'asf-altEmail', 'githubUsername'], (members
+ committers).uniq)
 
     lists = ASF::Mail.lists(true).select do |list, mode|
       list =~ /^#{pmc.mail_list}\b/
@@ -62,6 +62,7 @@ class Committee
         unMatchedSubs.delete_if {|k| allMail.include? k.downcase}
       end
       roster[person.id]['ldap'] = true
+      roster[person.id]['githubUsername'] = (person.attrs['githubUsername'] || []).join(',
')
     end
 
     committers.each do |person|
@@ -69,6 +70,7 @@ class Committee
         name: person.public_name,
         role: 'Committer'
       }
+      roster[person.id]['githubUsername'] = (person.attrs['githubUsername'] || []).join(',
')
     end
 
     roster.each {|id, info| info[:member] = ASF::Person.find(id).asf_member?}
diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index 351f2ef..6ed8f9c 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -40,7 +40,8 @@ class PPMC
         name: person.public_name, 
         member: person.asf_member?,
         icommit: incubator_committers.include?(person),
-        role: (owners.include?(person) ? 'PPMC Member' : 'Committer')
+        role: (owners.include?(person) ? 'PPMC Member' : 'Committer'),
+        githubUsername: (person.attrs['githubUsername'] || []).join(', ')
       }]
     }.to_h
 
@@ -51,7 +52,8 @@ class PPMC
         member: person.asf_member?,
         ipmc: ipmc.include?(person),
         icommit: incubator_committers.include?(person),
-        role: 'Mentor'
+        role: 'Mentor',
+        githubUsername: (person.attrs['githubUsername'] || []).join(', ')
       }
     end
 
diff --git a/www/roster/views/pmc/committers.js.rb b/www/roster/views/pmc/committers.js.rb
index 937c774..1593162 100644
--- a/www/roster/views/pmc/committers.js.rb
+++ b/www/roster/views/pmc/committers.js.rb
@@ -22,6 +22,7 @@ class PMCCommitters < Vue
           _tr do
             _th if @@auth
             _th 'id', data_sort: 'string'
+            _th 'githubUsername', data_sort: 'string'
             _th.sorting_asc 'public name', data_sort: 'string-ins'
           end
         end
@@ -71,9 +72,11 @@ class PMCCommitter < Vue
 
       if @@person.member
         _td { _b { _a @@person.id, href: "committer/#{@@person.id}"} }
+        _td @@person.githubUsername
         _td { _b @@person.name }
       else
         _td { _a @@person.id, href: "committer/#{@@person.id}" }
+        _td @@person.githubUsername
         _td @@person.name
       end
     end
diff --git a/www/roster/views/pmc/pmc.js.rb b/www/roster/views/pmc/pmc.js.rb
index 08650a3..447a09c 100644
--- a/www/roster/views/pmc/pmc.js.rb
+++ b/www/roster/views/pmc/pmc.js.rb
@@ -17,6 +17,7 @@ class PMCMembers < Vue
           _th if @@auth
           _th 'id', data_sort: 'string'
           _th.sorting_asc 'public name', data_sort: 'string-ins'
+          _th 'githubUsername', data_sort: 'string'
           _th 'starting date', data_sort: 'string'
           _th 'status - click cell for actions', data_sort: 'string'
         end
@@ -151,6 +152,8 @@ class PMCMember < Vue
         _td @@person.name
       end
 
+      _td @@person.githubUsername
+
       _td @@person.date
 
       if @state == :open
diff --git a/www/roster/views/ppmc/committers.js.rb b/www/roster/views/ppmc/committers.js.rb
index 1c17064..dd47675 100644
--- a/www/roster/views/ppmc/committers.js.rb
+++ b/www/roster/views/ppmc/committers.js.rb
@@ -26,6 +26,7 @@ class PPMCCommitters < Vue
           _tr do
             _th if @@auth.ppmc
             _th 'id', data_sort: 'string'
+            _th 'githubUsername', data_sort: 'string'
             _th.sorting_asc 'public name', data_sort: 'string-ins'
             _th 'notes'
           end
@@ -98,9 +99,11 @@ class PPMCCommitter < Vue
 
       if @@person.member
         _td { _b { _a @@person.id, href: "committer/#{@@person.id}"} }
+        _td @@person.githubUsername
         _td { _b @@person.name }
       else
         _td { _a @@person.id, href: "committer/#{@@person.id}" }
+        _td @@person.githubUsername
         _td @@person.name
       end
 
diff --git a/www/roster/views/ppmc/members.js.rb b/www/roster/views/ppmc/members.js.rb
index c177085..f4dab81 100644
--- a/www/roster/views/ppmc/members.js.rb
+++ b/www/roster/views/ppmc/members.js.rb
@@ -10,6 +10,7 @@ class PPMCMembers < Vue
         _tr do
           _th if @@auth.ppmc
           _th 'id', data_sort: 'string'
+          _th 'githubUsername', data_sort: 'string'
           _th.sorting_asc 'public name', data_sort: 'string-ins'
           _th 'notes'
         end
@@ -59,9 +60,11 @@ class PPMCMember < Vue
 
       if @@person.member
         _td { _b { _a @@person.id, href: "committer/#{@@person.id}" } }
+        _td @@person.githubUsername
         _td { _b @@person.name }
       else
         _td { _a @@person.id, href: "committer/#{@@person.id}" }
+        _td @@person.githubUsername
         _td @@person.name
       end
         
diff --git a/www/roster/views/ppmc/mentors.js.rb b/www/roster/views/ppmc/mentors.js.rb
index e353f5c..a64fe40 100644
--- a/www/roster/views/ppmc/mentors.js.rb
+++ b/www/roster/views/ppmc/mentors.js.rb
@@ -14,6 +14,7 @@ class PPMCMentors < Vue
         _tr do
           _th if @@auth.ipmc
           _th 'id'
+          _th 'githubUsername'
           _th 'public name'
           _th 'notes'
         end
@@ -58,12 +59,15 @@ class PPMCMentor < Vue
 
       if @@person.member
         _td { _b { _a @@person.id, href: "committer/#{@@person.id}" } }
+        _td @@person.githubUsername
         _td { _b @@person.name }
       elsif @@person.name
         _td { _a @@person.id, href: "committer/#{@@person.id}" }
+        _td @@person.githubUsername
         _td @@person.name
       else
         _td @@person.id
+        _td @@person.githubUsername
         _td @@person.name
       end
         


Mime
View raw message