From e7123dbcb89cc150428d6142e49963bacd43d6cc Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Wed, 24 Jul 2024 17:23:25 -0400 Subject: [PATCH] ref: unify signature of Webhook.__call__ --- src/sentry_plugins/github/webhooks/events/__init__.py | 2 +- src/sentry_plugins/github/webhooks/events/installation.py | 2 +- .../github/webhooks/events/installation_repository.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sentry_plugins/github/webhooks/events/__init__.py b/src/sentry_plugins/github/webhooks/events/__init__.py index e156cca25d2804..d68346f56997ef 100644 --- a/src/sentry_plugins/github/webhooks/events/__init__.py +++ b/src/sentry_plugins/github/webhooks/events/__init__.py @@ -1,5 +1,5 @@ class Webhook: - def __call__(self, event, organization=None): + def __call__(self, event, organization): raise NotImplementedError diff --git a/src/sentry_plugins/github/webhooks/events/installation.py b/src/sentry_plugins/github/webhooks/events/installation.py index be1d9658398507..34edf90039b2b8 100644 --- a/src/sentry_plugins/github/webhooks/events/installation.py +++ b/src/sentry_plugins/github/webhooks/events/installation.py @@ -7,7 +7,7 @@ class InstallationEventWebhook(Webhook): # https://developer.github.com/v3/activity/events/types/#installationevent - def __call__(self, event, organization=None): + def __call__(self, event, organization): action = event["action"] installation = event["installation"] # TODO(jess): handle uninstalls diff --git a/src/sentry_plugins/github/webhooks/events/installation_repository.py b/src/sentry_plugins/github/webhooks/events/installation_repository.py index d97f77466bdc7f..7ef6bc2a303e1e 100644 --- a/src/sentry_plugins/github/webhooks/events/installation_repository.py +++ b/src/sentry_plugins/github/webhooks/events/installation_repository.py @@ -7,7 +7,7 @@ class InstallationRepositoryEventWebhook(Webhook): # https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent - def __call__(self, event, organization=None): + def __call__(self, event, organization): installation = event["installation"] integration = integration_service.get_integration(