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 805d0525 Clarify intent of submitter of document (#278)
805d0525 is described below
commit 805d0525fdc95ba4f3b0dd2f6d13f9005b45175c
Author: Craig L Russell <[email protected]>
AuthorDate: Wed Jun 25 15:44:29 2025 -0700
Clarify intent of submitter of document (#278)
* Update parts.js.rb: add clarify-intent checkbox
* Create clarify-intent.erb
Add message to user.
* Update parts.js.rb
Move clarify-intent to its own section of the form
* Update parts.js.rb
clarify_intent = false is not needed
* Update clarify-intent.erb
Improve wording.
* Also need an action script to process the template
---------
Co-authored-by: Sebb <[email protected]>
---
.../workbench/templates/clarify-intent.erb | 13 +++++++
.../workbench/views/actions/clarify_intent.json.rb | 41 ++++++++++++++++++++++
www/secretary/workbench/views/parts.js.rb | 6 ++++
3 files changed, 60 insertions(+)
diff --git a/www/secretary/workbench/templates/clarify-intent.erb
b/www/secretary/workbench/templates/clarify-intent.erb
new file mode 100644
index 00000000..be3f498b
--- /dev/null
+++ b/www/secretary/workbench/templates/clarify-intent.erb
@@ -0,0 +1,13 @@
+Dear <%= @email.display_names.join(', ') %>,
+
+We received this document but it is not clear why you sent it.
+
+Please clarify your intent in sending this document.
+Secretary processes documents from contributors to ASF projects.
+
+For more details, please refer to the following:
+https://apache.org/licenses/contributor-agreements.html#submitting
+
+Warm Regards,
+
+<%= @sig %>
diff --git a/www/secretary/workbench/views/actions/clarify_intent.json.rb
b/www/secretary/workbench/views/actions/clarify_intent.json.rb
new file mode 100644
index 00000000..2b705308
--- /dev/null
+++ b/www/secretary/workbench/views/actions/clarify_intent.json.rb
@@ -0,0 +1,41 @@
+# extract message
+message = Mailbox.find(@message)
+
+# obtain per-user information
+_personalize_email(env.user)
+
+# extract/verify project
+_extract_project
+
+########################################################################
+# email submitter #
+########################################################################
+
+# send rejection email
+task "email #{message.from}" do
+ # build mail from template
+ @email = message.from
+ mail = message.reply(
+ from: @from,
+ cc: [
+ '[email protected]',
+ (@pmc.private_mail_list if @pmc), # copy pmc
+ (@podling.private_mail_list if @podling) # copy podling
+ ],
+ body: template('clarify-intent.erb')
+ )
+
+ # echo email
+ form do
+ _message mail.to_s
+ end
+
+ # deliver mail
+ complete do
+ _disposition :keep # set this first in case mail sending fails
+
+ mail.deliver!
+
+ _status 'request to clarify intent has been sent.'
+ end
+end
diff --git a/www/secretary/workbench/views/parts.js.rb
b/www/secretary/workbench/views/parts.js.rb
index 9c731bb3..18082bb6 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -234,6 +234,12 @@ class Parts < Vue
_span 'upload public key'
end
+ _label do
+ _input type: 'radio', name: 'doctype', value: 'clarify_intent',
+ onClick: self.reject
+ _span 'clarify intent'
+ end
+
# The reject reason list will grow, so do it last
_h4 'Reject email with message:'