示例#1
0
 def post(self, request, *args, **kwargs):
     # pylint: disable=unused-argument
     if 'integration_pk' in kwargs:
         integration = self.get_integration()
         update_webhook(self.get_project(), integration, request=request)
     else:
         # This is a brute force form of the webhook sync, if a project has a
         # webhook or a remote repository object, the user should be using
         # the per-integration sync instead.
         attach_webhook(project=self.get_project(), request=request)
     return HttpResponseRedirect(self.get_success_url())
示例#2
0
 def post(self, request, *args, **kwargs):
     # pylint: disable=unused-argument
     if 'integration_pk' in kwargs:
         integration = self.get_integration()
         update_webhook(self.get_project(), integration, request=request)
     else:
         # This is a brute force form of the webhook sync, if a project has a
         # webhook or a remote repository object, the user should be using
         # the per-integration sync instead.
         attach_webhook(project=self.get_project(), request=request)
     return HttpResponseRedirect(self.get_success_url())