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 75b1959 Don't create PDFProject key unnecessarily
75b1959 is described below
commit 75b1959f8de9e1d222fb9a1617525b33b8b6dca9
Author: Sebb <[email protected]>
AuthorDate: Mon Aug 2 13:59:51 2021 +0100
Don't create PDFProject key unnecessarily
Also ensure that PDFProject is not updated,
but Project is
---
www/secretary/workbench/views/actions/parse-icla.json.rb | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/www/secretary/workbench/views/actions/parse-icla.json.rb
b/www/secretary/workbench/views/actions/parse-icla.json.rb
index 5862cfa..43b3844 100644
--- a/www/secretary/workbench/views/actions/parse-icla.json.rb
+++ b/www/secretary/workbench/views/actions/parse-icla.json.rb
@@ -21,12 +21,13 @@ if attachment.end_with? '.pdf'
# Extract the project and adjust if necessary
project = parsed[:Project]
- parsed [:PDFProject] = project # retain the original value
-
if project
- project.downcase!
+ parsed [:PDFProject] = project.dup # retain the original value
+ project = project.downcase.sub('apache ','')
projects = (ASF::Podling.current+ASF::Committee.pmcs).map(&:name)
- unless projects.include? project
+ if projects.include? project
+ parsed[:Project] = project
+ else
if project.start_with? 'commons-'
parsed[:Project] = 'commons'
elsif project.start_with? 'log'