#NEWLINE# def review_request_published_cb( sender , user , review_request , changedesc , **kwargs ) : #NEWLINE# #INDENT# event = 'review_request_published' #NEWLINE# webhook_targets = WebHookTarget . objects . for_event ( event , review_request . local_site_id , review_request . repository_id ) #NEWLINE# if webhook_targets : #NEWLINE# #INDENT# request = FakeHTTPRequest ( user ) #NEWLINE# payload = { #NEWLINE# #INDENT# 'event' : event , #NEWLINE# 'is_new' : ( changedesc is None ) , #NEWLINE# 'review_request' : resources . review_request . serialize_object ( review_request , request = request ) , #NEWLINE# #UNINDENT# } #NEWLINE# if changedesc : #NEWLINE# #INDENT# payload [ 'change' ] = ( resources . change . serialize_object ( changedesc , request = request ) , ) #NEWLINE# #UNINDENT# dispatch_webhook_event ( request , webhook_targets , event , payload )