summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-10-24 09:14:48 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-24 14:21:25 +0100
commit98ca0b151517b3544454fd5c1656a2de631c4897 (patch)
treec087d127264ea1f6eb46ecfa5fd3b4e319056217 /scripts
parente586c9ddc86b6d35c651cecd3be22b3e43306ecf (diff)
downloadopenembedded-core-contrib-98ca0b151517b3544454fd5c1656a2de631c4897.tar.gz
patchtest-send-results: improve subject line
Pull the actual email's subject line from the .mbox file and use that in patchtest's test results response, so that it's clearer which patch it is replying to. 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-results7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 15ee5b077f..bb4604aeaf 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -53,7 +53,12 @@ with open(result_file, "r") as f:
testresult = f.read()
reply_contents = greeting + testresult + suggestions
-subject_line = f"Patchtest results for {result_basename}"
+
+# we know these patch files will only contain a single patch, so only
+# worry about the first element for getting the subject
+mbox = mailbox.mbox(args.patch)
+mbox_subject = mbox[0]['subject']
+subject_line = f"Patchtest results for {mbox_subject}"
if "FAIL" in testresult:
ses_client = boto3.client('ses', region_name='us-west-2')