diff --git a/src/sentry/plugins/base/v2.py b/src/sentry/plugins/base/v2.py index 166d76f3c37aac..5ec47cf32dcff6 100644 --- a/src/sentry/plugins/base/v2.py +++ b/src/sentry/plugins/base/v2.py @@ -11,6 +11,7 @@ from sentry.plugins.base.configuration import default_plugin_config, default_plugin_options from sentry.plugins.base.response import Response from sentry.plugins.config import PluginConfigMixin +from sentry.plugins.interfaces.releasehook import ReleaseHook from sentry.plugins.status import PluginStatusMixin from sentry.utils.hashlib import md5_text @@ -411,7 +412,7 @@ def get_feature_hooks(self, **kwargs): """ return [] - def get_release_hook(self, **kwargs): + def get_release_hook(self) -> type[ReleaseHook] | None: """ Return an implementation of ``ReleaseHook``. @@ -421,10 +422,10 @@ def get_release_hook(self, **kwargs): >>> def handle(self, request: Request) -> Response: >>> self.finish_release(version=request.POST['version']) - >>> def get_release_hook(self, **kwargs): + >>> def get_release_hook(self): >>> return MyReleaseHook """ - return [] + return None def get_custom_contexts(self): """Return a list of of context types. diff --git a/src/sentry_plugins/heroku/plugin.py b/src/sentry_plugins/heroku/plugin.py index df05ebf79c5872..a617bdf10a4e5a 100644 --- a/src/sentry_plugins/heroku/plugin.py +++ b/src/sentry_plugins/heroku/plugin.py @@ -215,5 +215,5 @@ def get_release_doc_html(self, hook_url):
heroku webhooks:add -i api:release -l notify -u {hook_url} -a YOUR_APP_NAME""" - def get_release_hook(self): + def get_release_hook(self) -> type[HerokuReleaseHook]: return HerokuReleaseHook