Do not notify submitter about revoked SRs
authorEd Bartosh <eduard.bartosh@intel.com>
Sat, 15 Mar 2014 13:47:52 +0000 (15:47 +0200)
committerEd Bartosh <eduard.bartosh@intel.com>
Sat, 15 Mar 2014 13:50:17 +0000 (15:50 +0200)
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 <eduard.bartosh@intel.com>
job_request.py

index 23f1307..a2a1a4f 100755 (executable)
@@ -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'),