[PATCH compass-ci] mail-robot: fix bug

[why] when received email_file's from like "Xing Ming", add has double quotes with it, the email message may end unexpectedly From: compass-ci-reply@qq.com To: shdluan@163.com Subject: [compass-ci] Account Ready Dear Luan ----email end [how] delete extra double quotes Signed-off-by: Luan Shengde <shdluan@163.com> --- container/mail-robot/lib/parse-apply-account-email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/mail-robot/lib/parse-apply-account-email.rb b/container/mail-robot/lib/parse-apply-account-email.rb index 8c55d8f..7024731 100755 --- a/container/mail-robot/lib/parse-apply-account-email.rb +++ b/container/mail-robot/lib/parse-apply-account-email.rb @@ -36,7 +36,7 @@ class ParseApplyAccountEmail @my_info = { 'my_email' => mail_content.from[0], - 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, ''), + 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '').gsub(/"/, ''), 'my_ssh_pubkey' => [] } end -- 2.23.0

'my_email' => mail_content.from[0],
- 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, ''), + 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '').gsub(/"/, ''),
Giving a match example at changelog may be easier to read. Thanks, RenWen
'my_ssh_pubkey' => [] } end -- 2.23.0

On Thu, Dec 24, 2020 at 09:58:23AM +0800, Ren Wen wrote:
'my_email' => mail_content.from[0],
- 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, ''), + 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '').gsub(/"/, ''),
Giving a match example at changelog may be easier to read.
I have done it in newer version. Thanks, Luan Shengde
Thanks, RenWen
'my_ssh_pubkey' => [] } end -- 2.23.0
-
Luan Shengde
-
Ren Wen