From ef9d8769191c18bdca812d24eb401d21ceeaca12 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Sat, 15 Mar 2014 15:47:52 +0200 Subject: [PATCH] Do not notify submitter about revoked SRs This is a follow-up fix for previously 'fixed' issue. Second try to disable notifications about 'revoked' SRs from build projects. Developers are still getting those confusing emails. Change-Id: I666713f407ebc0e164dc45e3802349cb6d390bbf Signed-off-by: Ed Bartosh --- job_request.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/job_request.py b/job_request.py index 23f1307..a2a1a4f 100755 --- a/job_request.py +++ b/job_request.py @@ -321,7 +321,9 @@ def main(): print 'Skipping processing of REQUEST_CREATE for prerelease project' return 0 - if event_type != 'OBS_SRCSRV_REQUEST_REVOKED': + if not (event_type == 'OBS_SRCSRV_REQUEST_REVOKED' or \ + (event_type == 'OBS_SRCSRV_REQUEST_STATECHANGE' and \ + event_fields['state'] == 'revoked')): notify_submiter(event_fields, data) gerrit = Gerrit(os.getenv('GERRIT_HOSTNAME'), os.getenv('GERRIT_USERNAME'), -- 2.7.4