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:12:54 +0000
commitf8a2af973d829c3c7f2dce39ce452daf74f31f52 (patch)
tree2dcd590f286ecdddab41d0c95f8e47fb6ec7750b /scripts
parent1a3ba4c312844d80ae382912b319e60ad8b30737 (diff)
downloadopenembedded-core-contrib-f8a2af973d829c3c7f2dce39ce452daf74f31f52.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. 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):
reply_contents = greeting + testresult + suggestions
ses_client = boto3.client('ses', region_name='us-west-2')
+
+ # Construct the headers for the email. We only want to reply
+ # directly to the tested patch, so make In-Reply-To and References
+ # the same value.
raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \
'\nCC: ' + cc_address + '\nSubject:' + subject_line + \
'\nIn-Reply-To:' + in_reply_to + \
+ '\nReferences:' + in_reply_to + \
'\nMIME-Version: 1.0" + \
"\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \
reply_contents + '\n\n--NextPart'