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 0bf4f280 Update key with message details
0bf4f280 is described below

commit 0bf4f28022bd5409c9e0464eb4f2fd8257bcdb6c
Author: Sebb <[email protected]>
AuthorDate: Sun Apr 13 17:36:05 2025 +0100

    Update key with message details
---
 www/secretary/workbench/views/actions/check-signature.json.rb | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/views/actions/check-signature.json.rb 
b/www/secretary/workbench/views/actions/check-signature.json.rb
index 2de50c9e..6ee1d736 100644
--- a/www/secretary/workbench/views/actions/check-signature.json.rb
+++ b/www/secretary/workbench/views/actions/check-signature.json.rb
@@ -75,7 +75,7 @@ def getURI(uri, file)
   end
 end
 
-def validate_sig(attachment, signature, msgid)
+def validate_sig(attachment, signature, msgid, message)
   # pick the latest gpg version
   gpg = `which gpg2`.chomp
   gpg = `which gpg`.chomp if gpg.empty?
@@ -140,6 +140,11 @@ def validate_sig(attachment, signature, msgid)
               else # we have a new key
                 ASF::SVN.svn!('add', outfile, {verbose: true})
               end
+              begin
+                message.add_email_details(outfile)
+              rescue StandardError => err
+                Wunderbar.warn "Failed to add properties for #{keyid} - #{err}"
+              end
               ASF::SVN.svn!('commit', outfile, {msg: "Adding key for msgid: 
#{msgid}", env: env})
             end
           else
@@ -189,7 +194,7 @@ def process
     signature  = message.find(@signature).as_file # This is derived from the 
YAML file
     msgid = message.headers.select{|k,v| k.downcase == 
'message-id'}.values.first
 
-    out, err, rc = validate_sig(attachment, signature, msgid)
+    out, err, rc = validate_sig(attachment, signature, msgid, message)
 
   ensure
     attachment.unlink if attachment

Reply via email to