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 2017/07/12 23:01:12 UTC
[whimsy] 02/02: collapse committers
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
commit ff4fd15bad360ceec386f940f754e13d84f42f4e
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Jul 12 19:01:01 2017 -0400
collapse committers
---
www/roster/models/committee.rb | 2 +-
www/roster/views/pmc/committers.js.rb | 10 ++++++----
www/roster/views/pmc/pmc.js.rb | 6 +++---
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index d85e5fe..335e949 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -55,7 +55,7 @@ class Committee
established: pmc.established,
ldap: members.map(&:id),
members: pmc.roster.keys,
- committers: Hash[committers.map {|person| [person.id, person.cn]}],
+ committers: committers.map(&:id),
asfmembers: (ASF.members & people).map(&:id),
roster: roster,
mail: Hash[lists.sort],
diff --git a/www/roster/views/pmc/committers.js.rb b/www/roster/views/pmc/committers.js.rb
index 16b28d8..86b22dd 100644
--- a/www/roster/views/pmc/committers.js.rb
+++ b/www/roster/views/pmc/committers.js.rb
@@ -5,8 +5,8 @@
class PMCCommitters < React
def render
if
- @@committee.committers.keys().all? do |id|
- @@committee.roster[id] or @@committee.members.include? id
+ @@committee.committers.all? do |id|
+ @@committee.members.include? id
end
then
_p 'All committers are members of the PMC'
@@ -56,8 +56,10 @@ class PMCCommitters < React
def componentWillReceiveProps()
committers = []
- for id in @@committee.committers
- committers << {id: id, name: @@committee.committers[id]}
+ @@committee.committers.each do |id|
+ person = @@committee.roster[id]
+ person.id = id
+ committers << person
end
@committers = committers.sort_by {|person| person.name}
diff --git a/www/roster/views/pmc/pmc.js.rb b/www/roster/views/pmc/pmc.js.rb
index 7b01f2c..6229fcd 100644
--- a/www/roster/views/pmc/pmc.js.rb
+++ b/www/roster/views/pmc/pmc.js.rb
@@ -112,7 +112,7 @@ class PMCMember < React
"#{@@committee.display_name} PMC?"
- committers = @@committee.committers.keys()
+ committers = @@committee.committers
pmc = @@committee.members
if committers.all? {|person| pmc.include? person}
_button.btn.btn_warning 'Add as a committer only',
@@ -149,7 +149,7 @@ class PMCMember < React
"Remove #{@@person.name} from committee-info.txt?"
else
# in both LDAP and committee-info.txt
- if @@committee.committers[@@person.id]
+ if @@committee.committers.include? @@person.id
_button.btn.btn_warning 'Remove only from PMC',
data_action: 'remove pmc info',
data_target: '#confirm', data_toggle: 'modal',
@@ -179,7 +179,7 @@ class PMCMember < React
_td.issue 'not in committee-info.txt'
elsif not @@person.ldap
_td.issue 'not in LDAP'
- elsif not @@committee.committers[@@person.id]
+ elsif not @@committee.committers.include? @@person.id
_td.issue 'not in committer list'
elsif @@person.id == @@committee.chair
_td.chair 'chair'
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.