This is an automated email from the ASF dual-hosted git repository.
rubys 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 ecbacc3 match ICLA on both id and original email address
ecbacc3 is described below
commit ecbacc3fa3e4be15bcf61e0de2d541e700f8fbb2
Author: Sam Ruby <[email protected]>
AuthorDate: Sun Feb 11 09:58:37 2018 -0500
match ICLA on both id and original email address
Enables 'additional ICLA' support for contributors who don't have an
availid.
Bonus: better error reporting when no matching ICLA is found
---
www/secretary/workbench/views/actions/icla2.json.rb | 7 +++++--
www/secretary/workbench/views/forms/icla2.js.rb | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/www/secretary/workbench/views/actions/icla2.json.rb
b/www/secretary/workbench/views/actions/icla2.json.rb
index 0e50ed1..51b0d72 100644
--- a/www/secretary/workbench/views/actions/icla2.json.rb
+++ b/www/secretary/workbench/views/actions/icla2.json.rb
@@ -104,7 +104,10 @@ end
# insert line into iclas.txt
task "svn commit foundation/officers/iclas.txt" do
- icla = ASF::ICLA.find_by_id(@id)
+ icla = ASF::ICLA.find_by_id(@id) || ASF::ICLA.find_by_email(@oldemail)
+ unless icla and icla.id == @id and icla.email == @oldemail
+ raise ArgumentError("ICLA not found for #@id:#@oldemail")
+ end
# construct line to be inserted
@iclaline ||= [
@@ -131,7 +134,7 @@ task "svn commit foundation/officers/iclas.txt" do
# update iclas.txt
iclas_txt = File.read(dest)
- iclas_txt[/^#{@id}:.*/] = @iclaline
+ iclas_txt[/^#{@id}:.*:#{@oldemail}:.*/] = @iclaline
File.write dest, ASF::ICLA.sort(iclas_txt)
# show the changes
diff --git a/www/secretary/workbench/views/forms/icla2.js.rb
b/www/secretary/workbench/views/forms/icla2.js.rb
index 089e70a..73a37da 100644
--- a/www/secretary/workbench/views/forms/icla2.js.rb
+++ b/www/secretary/workbench/views/forms/icla2.js.rb
@@ -51,6 +51,7 @@ class ICLA2 < Vue
_input type: 'hidden', name: 'signature', value: @@signature
_input type: 'hidden', name: 'filename', value: @icla && @icla.filename
_input type: 'hidden', name: 'id', value: @icla && @icla.id
+ _input type: 'hidden', name: 'oldemail', value: @icla && @icla.email
_h5 'Current values'
--
To stop receiving notification emails like this one, please contact
[email protected].