From 31d3d11bb45a1d41d0376a29dff30249d833b1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 30 Jan 2024 14:51:56 +0200 Subject: [PATCH] Print the subject project tags in a deterministic order Currently they are in an unspecified order, which means that for one chain of mails, each mail may contain the tags in a different order. Sort them, to keep the order deterministic. --- AWS/Lambda/PREmailer/pr_emailer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AWS/Lambda/PREmailer/pr_emailer.py b/AWS/Lambda/PREmailer/pr_emailer.py index 182ea91..f0c2716 100644 --- a/AWS/Lambda/PREmailer/pr_emailer.py +++ b/AWS/Lambda/PREmailer/pr_emailer.py @@ -398,7 +398,7 @@ def lambda_handler(event, context): if 'MAIL_TO' in os.environ: mail_to = os.environ.get('MAIL_TO') # Setup the mail Subject - subject_tag = ' '.join(['[{}]'.format(p) for p in project_list]) + subject_tag = ' '.join(['[{}]'.format(p) for p in sorted(project_list)]) subject = f"{subject_tag} {pr_title} (PR #{pr_number})" # validate cors access