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 11c2c60e Add support code for adding seconds
11c2c60e is described below
commit 11c2c60eec6aca3e1e9ccaf21f882e3a4b2d8727
Author: Sebb <[email protected]>
AuthorDate: Sat Feb 14 23:34:25 2026 +0000
Add support code for adding seconds
UI to follow
---
lib/whimsy/asf/member-files.rb | 56 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/lib/whimsy/asf/member-files.rb b/lib/whimsy/asf/member-files.rb
index e9564da2..564443df 100644
--- a/lib/whimsy/asf/member-files.rb
+++ b/lib/whimsy/asf/member-files.rb
@@ -121,6 +121,24 @@ module ASF
end
end
+ # return nomination entry headers
+ def self.nomination_headers()
+ noms = []
+ self.parse_file(NOMINATED_MEMBERS) do |x, _y|
+ noms << x
+ end
+ noms
+ end
+
+ # return board entry headers
+ def self.board_headers()
+ noms = []
+ self.parse_file(NOMINATED_BOARD) do |x, _y|
+ noms << x
+ end
+ noms
+ end
+
# create a member nomination entry in the standard format
#
def self.make_member_nomination(fields = {})
@@ -225,6 +243,44 @@ module ASF
end
end
+ # Add member second to file contents
+ def self.add_member_second(contents, entry)
+ nominee = entry[:nominee]
+ secby = entry[:secby]
+ statement = entry[:statement]
+ output = []
+ foundSection = false # In nomineed section
+ contents.split("\n").each do |l|
+ if foundSection
+ if l.start_with?('---------------------------') # end of section,
post second
+ output << ASFString.reflow("(#{secby}) #{statement}", 4, 80)
+ output << ''
+ foundSection = false
+ elsif l =~ %r{^\s+Seconded by:\s*(\S)?} # may have trailing space
+ if $1 # already have a second
+ l += ",#{secby}@apache.org"
+ else
+ l += " #{secby}@apache.org"
+ end
+ end
+ else
+ if l.strip == nominee
+ foundSection = true
+ end
+ end
+ output << l
+ end
+ output.join("\n")
+ end
+
+ # Add a second for a member nominee
+ def self.commit_member_second(env, wunderbar, entry, msg)
+ nomfile = latest_meeting(NOMINATED_MEMBERS)
+ ASF::SVN.update(nomfile, msg, env, wunderbar) do |_tmpdir, contents|
+ add_member_second(contents, entry)
+ end
+ end
+
# create a single director ballot statement (if not present)
# @param availid of director nominee
def self.add_board_ballot(env, wunderbar, availid, msg=nil, opt={})