(whimsy) branch master updated: Keep most recent email
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 37e2c4be Keep most recent email 37e2c4be is described below commit 37e2c4be1c23a05c56a9f10213a328dccf749cd9 Author: Sebb AuthorDate: Sun Mar 10 23:59:22 2024 + Keep most recent email --- www/members/invitations.cgi | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index ae937d49..fb4860ef 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -51,6 +51,7 @@ def setup_data mail = YamlFile.read(index) mail.each do |k, v| link = lists_link(v) + envdate = v[:EnvelopeDate] # This may not find all the invites ... # Note: occasionally someone will forget to copy members@, in which case the email # may be sent as a reply @@ -61,8 +62,11 @@ def setup_data (to.addresses + cc.addresses).each do |add| addr = add.address next if addr == 'memb...@apache.org' - invites[:emails][addr] = link - invites[:names][add.display_name] = link if add.display_name + prev = invites[:emails][addr] || [nil,''] + if envdate > prev[1] # Only store later dates +invites[:emails][addr] = [link, envdate] # temp save the timestamp +invites[:names][add.display_name] = link if add.display_name + end end if pfx # it's a reply add = Mail::Address.new(v[:From]) @@ -73,6 +77,8 @@ def setup_data end end + invites[:emails].transform_values!{|v| v.first} # Drop the timestamp + nominated_by = {} # might be more than one ... ASF::Person.member_nominees.each do |k, v|
(whimsy) branch master updated: Don't forget CC addressees
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 1d5f6b05 Don't forget CC addressees 1d5f6b05 is described below commit 1d5f6b054e1d63233c1eaaed0ce02c366bee5f5e Author: Sebb AuthorDate: Sun Mar 10 23:57:40 2024 + Don't forget CC addressees --- www/members/invitations.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 56977f08..ae937d49 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -57,7 +57,8 @@ def setup_data if v[:Subject] =~ /^(Re: )?Invitation to join The Apache Software Foundation Membership/ pfx = $1 to = Mail::AddressList.new(v[:To]) -to.addresses.each do |add| +cc = Mail::AddressList.new(v[:Cc]) +(to.addresses + cc.addresses).each do |add| addr = add.address next if addr == 'memb...@apache.org' invites[:emails][addr] = link
(whimsy) branch master updated: Use hash instead of anonymous array
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 805acac9 Use hash instead of anonymous array 805acac9 is described below commit 805acac99c345c1beab445f3199a7405b767f55f Author: Sebb AuthorDate: Sun Mar 10 23:56:44 2024 + Use hash instead of anonymous array --- www/members/invitations.cgi | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 5162a028..56977f08 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -30,11 +30,12 @@ def setup_data # which entries are shown as uninvited; get availid and name notinvited = {} notapplied = [] + fields = %i(invite apply mail karma id name) ASF::MeetingUtil.parse_memapp(memappfile).filter_map do |a| if a.first == 'no' notinvited[a[-2]] = {name: a[-1]} elsif a[1..-3].any? {|e| e == 'no'} # any no after first? - notapplied
(whimsy) branch master updated: Only send change emails from active node
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 f2d971d5 Only send change emails from active node f2d971d5 is described below commit f2d971d530725b268d8e51cedb6e458822519d2d Author: Sebb AuthorDate: Sun Mar 10 17:26:05 2024 + Only send change emails from active node --- tools/pubsub-ci-email.rb | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/pubsub-ci-email.rb b/tools/pubsub-ci-email.rb index eb7ac8c2..61ce7889 100755 --- a/tools/pubsub-ci-email.rb +++ b/tools/pubsub-ci-email.rb @@ -3,11 +3,13 @@ $LOAD_PATH.unshift '/srv/whimsy/lib' # Script to detect changes to committee-info.txt and send emails to board and the PMC +# Only sends change emails if it is the active Whimsy (or a test node, which is expected to use a dummy smtpserver) require 'mail' require 'net/http' require 'json' require 'whimsy/asf' +require 'whimsy/asf/status' require 'whimsy/asf/json-utils' def stamp(*s) @@ -197,7 +199,7 @@ def do_diff(initialhash, currenthash, triggerrev) subject subject body body end -mail.deliver! +mail.deliver! if Status.active? or Status.testnode? end end @@ -281,7 +283,7 @@ if $0 == __FILE__ subject subject body body end - mail.deliver! + mail.deliver! # Does it matter if this is sent from an inactive node? raise ArgumentError.new error if error
(whimsy) branch master updated: Add some comments
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 8ce92ffd Add some comments 8ce92ffd is described below commit 8ce92ffd4cf709d22d6b31822fecc2ae50436f17 Author: Sebb AuthorDate: Sun Mar 10 13:47:44 2024 + Add some comments --- www/members/invitations.cgi | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index f91b88fc..5162a028 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -128,9 +128,14 @@ _html do nominationsurl => 'nominated-members.txt', }, helpblock: -> { -_p 'This script checks memapp-received.txt against invitation emails seen in memb...@apache.org' +_p do + _ 'This script checks' + _a 'memapp-received.txt', href: memappurl + _ 'against invitation emails seen in' + _a 'memb...@apache.org', href: 'https://lists.apache.org/list.html?memb...@apache.org' +end _p 'It does not check against applications which are pending' -_p 'The invite and reply columns link to the relevant emails if possible' +_p 'The invite and reply columns link to the relevant emails in members@ if possible' _p %{ N.B. The code only looks at the subject to determine if an email is an invite or its reply } @@ -141,6 +146,7 @@ _html do _p do _ 'If an invite or reply has been seen, the relevant table cell is' _span.missing 'flagged' +_ '. After confirming that the invite was correctly identified, the memapp-received.txt file can be updated' end _table.table.table_striped do _tr do
(whimsy) branch master updated: Sort by nominator(s)
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 e32593aa Sort by nominator(s) e32593aa is described below commit e32593aa41a5a55d32a0a2e8730d4cbd167ee1a9 Author: Sebb AuthorDate: Sun Mar 10 13:32:11 2024 + Sort by nominator(s) --- www/members/invitations.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 6d5561eb..f91b88fc 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -151,7 +151,8 @@ _html do _th 'nominator(s)' end -notinvited.each do |id, v| +# sort by nominators to make it easier to send reminders +notinvited.sort_by{|k,v| v[:nominators].join(', ')}.each do |id, v| _tr_ do _td id _td v[:name]
(whimsy) branch master updated: User id can contain - and _
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 ea588076 User id can contain - and _ ea588076 is described below commit ea5880764bee4a60af6d71acded8eb0ba65cc750 Author: Sebb AuthorDate: Sun Mar 10 12:55:44 2024 + User id can contain - and _ --- www/secretary/workbench/views/memapp.json.rb | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/secretary/workbench/views/memapp.json.rb b/www/secretary/workbench/views/memapp.json.rb index 1255edef..07cd8e7d 100644 --- a/www/secretary/workbench/views/memapp.json.rb +++ b/www/secretary/workbench/views/memapp.json.rb @@ -5,7 +5,12 @@ meetings = ASF::SVN['Meetings'] received = Dir["#{meetings}/2*/memapp-received.txt"].max # extract contents -pattern = /^\w+\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(.*?)\s*\n/ +# Sample +# Invite? Applied? members@? Karma? ID Name +# --- - -- --- -- +# yes no nono user-id_User name +# N.B. user id can contain - and _ +pattern = /^\w+\s+(\w+)\s+(\w+)\s+(\w+)\s+([a-z][a-z_0-9-]+)\s+(.*?)\s*\n/ if Date.today - Date.parse(received[/\d{8}/]) <= 32 table = File.read(received).scan(pattern) else
(whimsy) branch master updated: Duh - elsif doesn't work here any longer
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 fa03354c Duh - elsif doesn't work here any longer fa03354c is described below commit fa03354ca54bca22d63c99b524095aaae7a6fa8a Author: Sebb AuthorDate: Sun Mar 10 11:38:26 2024 + Duh - elsif doesn't work here any longer --- www/members/invitations.cgi | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 3b7391b7..6d5561eb 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -54,6 +54,7 @@ def setup_data # Note: occasionally someone will forget to copy members@, in which case the email # may be sent as a reply if v[:Subject] =~ /^(Re: )?Invitation to join The Apache Software Foundation Membership/ +pfx = $1 to = Mail::AddressList.new(v[:To]) to.addresses.each do |add| addr = add.address @@ -61,10 +62,11 @@ def setup_data invites[:emails][addr] = link invites[:names][add.display_name] = link if add.display_name end - elsif v[:Subject] =~ /^Re: Invitation to join The Apache Software Foundation Membership/ -add = Mail::Address.new(v[:From]) -replies[:emails][add.address] = link -replies[:names][add.display_name] = link if add.display_name +if pfx # it's a reply + add = Mail::Address.new(v[:From]) + replies[:emails][add.address] = link + replies[:names][add.display_name] = link if add.display_name +end end end end
(whimsy) branch master updated: Update invitations.cgi
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 6b01cf20 Update invitations.cgi 6b01cf20 is described below commit 6b01cf20b14a88ff3b87aad94fa52ea84eafaa1c Author: Sebb AuthorDate: Sun Mar 10 09:43:30 2024 + Update invitations.cgi --- www/members/invitations.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index eb38d9a1..3b7391b7 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -132,6 +132,7 @@ _html do _p %{ N.B. The code only looks at the subject to determine if an email is an invite or its reply } + } ) do _h1 'Nominations listed as not yet invited in memapp-received.txt'
(whimsy) branch master updated: Update invitations.cgi
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 47ee03ba Update invitations.cgi 47ee03ba is described below commit 47ee03bac2390d415ba4bfc87768cf989212a213 Author: Sebb AuthorDate: Sun Mar 10 09:40:12 2024 + Update invitations.cgi --- www/members/invitations.cgi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 725a8e08..eb38d9a1 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -128,8 +128,10 @@ _html do helpblock: -> { _p 'This script checks memapp-received.txt against invitation emails seen in memb...@apache.org' _p 'It does not check against applications which are pending' -_p 'The invite and reply columns link to the relevant emails' - } +_p 'The invite and reply columns link to the relevant emails if possible' +_p %{ +N.B. The code only looks at the subject to determine if an email is an invite or its reply +} ) do _h1 'Nominations listed as not yet invited in memapp-received.txt'