This is an automated email from the ASF dual-hosted git repository.
curcuru 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 8e0c72f0 Add simplistic display of director nominee nominations plus
statements
8e0c72f0 is described below
commit 8e0c72f0c832f3b231438f2c869b1181456fd54f
Author: Shane Curcuru <[email protected]>
AuthorDate: Sat Feb 1 21:30:21 2025 -0500
Add simplistic display of director nominee nominations plus statements
---
lib/whimsy/asf/member-files.rb | 26 +++++++++++++++++++++
www/members/check_boardstmt.cgi | 51 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+)
diff --git a/lib/whimsy/asf/member-files.rb b/lib/whimsy/asf/member-files.rb
index 954b6e4b..980fbabb 100644
--- a/lib/whimsy/asf/member-files.rb
+++ b/lib/whimsy/asf/member-files.rb
@@ -269,6 +269,32 @@ module ASF
end
nominees
end
+
+ # Return hash of board nomination statements
+ # TODO Annotate with board nominees data?
+ def self.board_statements
+ statements = {}
+ Dir["#{File.join(latest_meeting(),
BOARD_BALLOT)}/*#{BOARD_BALLOT_EXT}"].each do |f|
+ statements[File.basename(f, BOARD_BALLOT_EXT)] =
{'candidate_statement' => IO.read(f)}
+ end
+ return statements
+ end
+
+ # Merged board nominations and statements
+ def self.board_all
+ noms = board_nominees
+ stats = board_statements
+ combined = {}
+ noms.each do |availid, hash|
+ combined[availid] = hash.merge(stats.fetch(availid, {}))
+ combined[availid]['Nomination Statement'] =
combined[availid]['Nomination Statement'].join('\n')
+ combined[availid]['nombyemail'] = combined[availid].fetch('Nominated
by', '')
+ combined[availid]['nombyeavailid'] =
combined[availid]['nombyemail'].sub('@apache.org', '')
+ person = ASF::Person.find(combined[availid]['nombyeavailid'])
+ combined[availid]['nombycn'] = person.public_name
+ end
+ return combined
+ end
end
end
diff --git a/www/members/check_boardstmt.cgi b/www/members/check_boardstmt.cgi
new file mode 100755
index 00000000..ba46d1de
--- /dev/null
+++ b/www/members/check_boardstmt.cgi
@@ -0,0 +1,51 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Review existing Board statements" # Wvisible:meeting
+$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'wunderbar/bootstrap'
+require 'whimsy/asf'
+require 'whimsy/asf/member-files'
+require 'whimsy/asf/meeting-util'
+
+_html do
+ _body? do
+ latest_meeting_dir = ASF::MeetingUtil.latest_meeting_dir
+ timelines = ASF::MeetingUtil.get_timeline(latest_meeting_dir)
+ _whimsy_body(
+ title: PAGETITLE,
+ related: {
+ 'meeting.cgi' => 'Member Meeting FAQ and info',
+ 'nominate_board.cgi' => 'Nominate someone for the Board',
+ 'check_membernoms.cgi' => 'Cross-check existing New Member
nominations',
+ ASF::SVN.svnpath!('Meetings') => 'Official Meeting Agenda Directory'
+ },
+ helpblock: -> {
+ _b "For: #{timelines['meeting_type']} Meeting on:
#{timelines['meeting_iso']}"
+ _ 'This script displays a list of currently nominated directors and
both statements from the Nominator/seconds, and (when present) Candidate
statements from the nominees themselves.'
+ _br
+ _ 'IMPORTANT: many director candidates may not add statements until
near the nomination close deadline; this is just a preview!'
+ _br
+ _ 'This only works in the period shortly before or after a Members
meeting!'
+ }
+ ) do
+ statements = ASF::MemberFiles.board_all
+ statements.each do |availid, shash|
+ _div id: availid
+ _whimsy_panel("Director Nominee: #{shash.fetch('Public Name', '')}
(#{availid})", style: 'panel-default') do
+ _p do
+ _strong "Director's Own Statement (once present)"
+ _br
+ _ shash.fetch('candidate_statement', '')
+ end
+ _p do
+ _strong "Nominated By: #{shash['nombycn']}
(#{shash['nombyeavailid']})"
+ _br
+ _ "Testing: Seconded by = #{shash['Seconded by']}"
+ _ 'Nominator Statment(s):'
+ _br
+ _ shash.fetch('Nomination Statement', '')
+ end
+ end
+ end
+ end
+ end
+end