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 35b870f2 Fix up nominees listing as well for n/a entries
35b870f2 is described below
commit 35b870f2d529a14d68e30cf913f1e71c2ffb7404
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 7 00:56:08 2025 +0000
Fix up nominees listing as well for n/a entries
---
www/members/watch.cgi | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/www/members/watch.cgi b/www/members/watch.cgi
index 93cdfa83..3d206282 100755
--- a/www/members/watch.cgi
+++ b/www/members/watch.cgi
@@ -33,7 +33,7 @@ _html do
watch_list = ASF::Person.member_watch_list.keys # array of Person entries
meeting = ASF::MemberFiles.latest_meeting
- nominations = ASF::MemberFiles.member_nominees.keys
+ nominations = ASF::MemberFiles.member_nominees
# determine which list to report on, based on the URI
request = ENV['REQUEST_URI']
@@ -116,7 +116,16 @@ _html do
elsif request =~ /nominees/
_h2_ 'Member Nominees'
# Keep only ids that are not current members
- list = nominations.map {|id| ASF::Person.find(id)}.reject{|p|
p.asf_member_status == :current}
+ list = nominations.filter_map do |id, info|
+ if id.start_with? 'n/a_'
+ p = ASF::Person.new(id)
+ p.attrs['cn'] = info['Public Name'] # public name
+ p
+ else
+ p = ASF::Person.find(id)
+ p if p.asf_member_status != :current # drop current members
+ end
+ end
elsif request =~ /appstatus/
_h2_ 'Elected Members - Application Status'
nanum = 0
@@ -128,7 +137,7 @@ _html do
id = tokens.pop
if id == 'n/a'
nanum += 1
- id = 'notinavail_' + nanum.to_s
+ id = "notinavail_#{nanum+=1}"
p = ASF::Person.new(id)
p.attrs['cn'] = name # public name
list << p
@@ -212,7 +221,7 @@ _html do
_td.text_danger 'no'
end
else
- if nominations.include? person.id
+ if nominations.key? person.id
_td 'yes'
else
_td
@@ -220,7 +229,7 @@ _html do
end
# ASF id
- if person.id =~ /^notinavail_\d+$/
+ if person.id =~ %r{^(notinavail_|n/a_)\d+$}
_td! '(not yet a committer)'
elsif person.asf_member_status == :current
_td! do