diff options
author | Josh Boyer <jwboyer@redhat.com> | 2023-10-19 17:20:27 +0000 |
---|---|---|
committer | Josh Boyer <jwboyer@redhat.com> | 2023-10-19 17:20:27 +0000 |
commit | d983107a2dfa60d70df4101b69bfe7054db9704c (patch) | |
tree | 30cb6f460d1dd507538dffee7107938e001bde6d | |
parent | 1115cf5ca9a6c667551a4d677bfa33cea95216da (diff) | |
parent | 6ed754659e1540f0df58f0b4272f78f39f731a14 (diff) | |
download | linux-firmware-d983107a2dfa60d70df4101b69bfe7054db9704c.tar.gz |
Merge branch 'mlimonci/fix-email' into 'main'
Fix the robot email script
See merge request kernel-firmware/linux-firmware!36
-rwxr-xr-x | contrib/process_linux_firmware.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/process_linux_firmware.py b/contrib/process_linux_firmware.py index 4ef0aa76..2b7c7f8d 100755 --- a/contrib/process_linux_firmware.py +++ b/contrib/process_linux_firmware.py @@ -79,11 +79,12 @@ def reply_email(content, branch): reply = email.message.EmailMessage() orig = email.message_from_string(content) - targets = email.utils.getaddresses( - orig.get_all("to", []) + orig.get_all("cc", []) + orig.get_all("from", []) + reply["To"] = ", ".join( + email.utils.formataddr(t) + for t in email.utils.getaddresses( + orig.get_all("from", []) + orig.get_all("to", []) + orig.get_all("cc", []) + ) ) - for target in targets: - reply["To"] += email.utils.formataddr(target) reply["From"] = "linux-firmware@kernel.org" reply["Subject"] = "Re: {}".format(orig["Subject"]) |