From ee12e9d29eb3874b4eedb7ac09abbc29de9b06bb Mon Sep 17 00:00:00 2001 From: Yonghee Han Date: Mon, 26 Aug 2019 19:35:26 +0900 Subject: [PATCH] Add a "Fail" string for the failure case When Auto Git-sync is failed Change-Id: I6511cc711743b579f2c4a9d6810f5cad81d6b0ed --- job_submit_request_git_sync.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/job_submit_request_git_sync.py b/job_submit_request_git_sync.py index 60d26d8..70ed4c6 100644 --- a/job_submit_request_git_sync.py +++ b/job_submit_request_git_sync.py @@ -372,8 +372,14 @@ def update_sync_for_git_sync(tmpdir, private_gerrit, target, requests, request_s if True: ### Init MailSender #### my_mail = MailSender() - - my_mail.add_title('[Auto Git-Sync] Target Project:%s Branch:%s' %(target_project, branch)) + if upstream_failures or \ + overwrite_failures or \ + merge_failures or \ + submit_failures or \ + submit_request_failures: + my_mail.add_title('[Auto Git-Sync Fail] Target Project:%s Branch:%s' %(target_project, branch)) + else: + my_mail.add_title('[Auto Git-Sync] Target Project:%s Branch:%s' %(target_project, branch)) my_mail.add_message('Hello\n A Build System inform you about Auto Git-Sync results\n\n') my_mail.add_message('Public Source Snapshot: %s \nUpstream Branch: %s\nTarget Project: %s\nTarget Branch: %s' \ %(request_snapshot, UPSTREAM_BRANCH, target_project, branch)) -- 2.7.4