Skip to content

Commit 307e4e4

Browse files
authored
chore(notifications): Update starter platform code to use existing app (#93614)
We probably don't need two apps where one manages a subset of the other. This will make things a tiny bit more colocated.
1 parent d93434e commit 307e4e4

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

src/sentry/conf/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ def env(
408408
"sentry.sentry_apps",
409409
"sentry.integrations",
410410
"sentry.notifications",
411-
"sentry.notifications.platform",
412411
"sentry.flags",
413412
"sentry.monitors",
414413
"sentry.uptime",

src/sentry/notifications/apps.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@ class Config(AppConfig):
55
name = "sentry.notifications"
66

77
def ready(self):
8-
pass
8+
# Register the NotificationProviders for the platform
9+
from sentry.notifications.platform.discord.provider import ( # NOQA
10+
DiscordNotificationProvider,
11+
)
12+
from sentry.notifications.platform.email.provider import EmailNotificationProvider # NOQA
13+
from sentry.notifications.platform.msteams.provider import ( # NOQA
14+
MSTeamsNotificationProvider,
15+
)
16+
from sentry.notifications.platform.slack.provider import SlackNotificationProvider # NOQA

src/sentry/notifications/platform/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ To register a new provider:
1313
3. Create a provider module in the new directory.
1414
- Extend `NotificationProvider` from [`.provider`](./provider.py) and implement its methods/variables.
1515
- Import `provider_registry` from [`.registry`](./registry.py) and add it via decorator: `@provider_registry.register(<YOUR-KEY-HERE>)`
16-
4. In [.apps](./apps.py), explicitly import the module to register the provider on initialization.
16+
4. In [../apps](../apps.py), explicitly import the module to register the provider on initialization.

src/sentry/notifications/platform/apps.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)