summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2024-02-09 09:30:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-10 14:13:24 +0000
commit465c25ce2ddb310b6faf7fc27ab6caa2934337ee (patch)
tree1f76690debec87fcabf431f7f83697a59db8af12 /scripts
parentc472b4ce5990080e258a409cec0cab4cdb1a37f8 (diff)
downloadpoky-465c25ce2ddb310b6faf7fc27ab6caa2934337ee.tar.gz
patchtest-send-results: Add 'References' header
Based on https://www.rfc-editor.org/rfc/rfc2822#section-3.6.4, to get proper threading there should be a 'References' field defined in Patchtest's response headers if its replies are going to thread properly on Patchwork. This wasn't there before, hence why were were seeing the responses in the right place on the mailing list but not Patchwork. Since we only want Patchtest to reply directly to the tested patch, the 'References' field should only need to contain the same ID as the 'In-Reply-To' one. (From OE-Core rev: f8a2af973d829c3c7f2dce39ce452daf74f31f52) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/patchtest-send-results5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 075b60d8f7..9fd24c9b95 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -81,9 +81,14 @@ if has_a_failed_test(testresult):
81 reply_contents = greeting + testresult + suggestions 81 reply_contents = greeting + testresult + suggestions
82 82
83 ses_client = boto3.client('ses', region_name='us-west-2') 83 ses_client = boto3.client('ses', region_name='us-west-2')
84
85 # Construct the headers for the email. We only want to reply
86 # directly to the tested patch, so make In-Reply-To and References
87 # the same value.
84 raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \ 88 raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \
85 '\nCC: ' + cc_address + '\nSubject:' + subject_line + \ 89 '\nCC: ' + cc_address + '\nSubject:' + subject_line + \
86 '\nIn-Reply-To:' + in_reply_to + \ 90 '\nIn-Reply-To:' + in_reply_to + \
91 '\nReferences:' + in_reply_to + \
87 '\nMIME-Version: 1.0" + \ 92 '\nMIME-Version: 1.0" + \
88 "\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \ 93 "\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \
89 reply_contents + '\n\n--NextPart' 94 reply_contents + '\n\n--NextPart'