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 f08c1ff  Also sub to members-notify
f08c1ff is described below

commit f08c1ff4ba26c7b281865d47560751faf0086a84
Author: Sebb <[email protected]>
AuthorDate: Sat Mar 5 14:24:13 2022 +0000

    Also sub to members-notify
---
 .../workbench/views/actions/memapp.json.rb         | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/www/secretary/workbench/views/actions/memapp.json.rb 
b/www/secretary/workbench/views/actions/memapp.json.rb
index e276a2b..0252e7c 100644
--- a/www/secretary/workbench/views/actions/memapp.json.rb
+++ b/www/secretary/workbench/views/actions/memapp.json.rb
@@ -142,6 +142,35 @@ task "subscribe to [email protected]" do
 end
 
 ########################################################################
+#                   subscribe to [email protected]                    #
+########################################################################
+
+task "subscribe to [email protected]" do
+  user = ASF::Person.find(@availid)
+  vars = {
+    version: 3, # This must match committers/subscribe.cgi#FORMAT_NUMBER
+    availid: @availid,
+    addr: @availid + '@apache.org', # use ASF email here
+    listkey: 'members-notify',
+    member_p: true,
+    chair_p: ASF.pmc_chairs.include?(user),
+  }
+  @subreq = JSON.pretty_generate(vars) + "\n"
+
+  form do
+    _textarea @subreq, name: 'subreq', rows: @subreq.split("\n").length
+  end
+
+  complete do
+    # determine file name
+    fn = "#{@availid}-members-notify-#{Time.now.strftime 
'%Y%m%d-%H%M%S-%L'}.json"
+
+    rc = ASF::SVN.create_(ASF::SVN.svnurl!('subreq'), fn, @subreq, @document, 
env, _)
+    raise RuntimeError.new("exit code: #{rc}") if rc != 0
+  end
+end
+
+########################################################################
 #                      update memapp-received.txt                      #
 ########################################################################
 

Reply via email to