diff --git a/src/sentry/integrations/base.py b/src/sentry/integrations/base.py index 1f591adae8eab6..80303a8fdff34f 100644 --- a/src/sentry/integrations/base.py +++ b/src/sentry/integrations/base.py @@ -147,7 +147,9 @@ class is just a descriptor for how that object functions, and what behavior # whether or not the integration installation be initiated from Sentry can_add = True - # can the integration be disabled ? + # if the integration can be uninstalled in Sentry, set to False + # if True, the integration must be uninstalled from the other platform + # which is uninstalled/disabled via wehbook can_disable = False # if the integration has no application-style access token, associate diff --git a/src/sentry/integrations/github/integration.py b/src/sentry/integrations/github/integration.py index 61db18cb4d0a09..181f477f59a57b 100644 --- a/src/sentry/integrations/github/integration.py +++ b/src/sentry/integrations/github/integration.py @@ -52,20 +52,6 @@ ), ] -disable_dialog = { - "actionText": "Visit GitHub", - "body": "Before deleting this integration, you must uninstall this" - " integration from GitHub. After uninstalling, your integration will" - " be disabled at which point you can choose to delete this" - " integration.", -} - -removal_dialog = { - "actionText": "Delete", - "body": "Deleting this integration will delete all associated repositories" - " and commit data. This action cannot be undone. Are you sure you" - " want to delete your integration?", -} metadata = IntegrationMetadata( description=DESCRIPTION.strip(), @@ -74,7 +60,7 @@ noun=_("Installation"), issue_url="https://github.com/getsentry/sentry/issues/new?title=GitHub%20Integration:%20&labels=Component%3A%20Integrations", source_url="https://github.com/getsentry/sentry/tree/master/src/sentry/integrations/github", - aspects={"disable_dialog": disable_dialog, "removal_dialog": removal_dialog}, + aspects={}, ) API_ERRORS = { @@ -160,8 +146,6 @@ class GitHubIntegrationProvider(IntegrationProvider): integration_cls = GitHubIntegration features = frozenset([IntegrationFeatures.COMMITS, IntegrationFeatures.ISSUE_BASIC]) - can_disable = True - setup_dialog_config = {"width": 1030, "height": 1000} def post_install(self, integration, organization, extra=None): diff --git a/src/sentry/integrations/github/webhook.py b/src/sentry/integrations/github/webhook.py index 517cba3814c0aa..4f0868f5d07fcb 100644 --- a/src/sentry/integrations/github/webhook.py +++ b/src/sentry/integrations/github/webhook.py @@ -118,7 +118,7 @@ def __call__(self, event, host=None): "github.deletion-missing-integration", extra={ "action": event["action"], - "installation_name": event["account"]["login"], + "installation_name": installation["account"]["login"], "external_id": six.text_type(external_id), }, )