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 <tgamb...@baylibre.com> --- scripts/patchtest-send-results | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 15ee5b077fc..bb4604aeaf1 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') -- 2.41.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#189645): https://lists.openembedded.org/g/openembedded-core/message/189645 Mute This Topic: https://lists.openembedded.org/mt/102157318/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-