Skip to content

Commit 56084b5

Browse files
authored
fix(aci): return sentry app component title in available action endpoint (#92138)
If available, we need to return the sentry app component's title to display in the frontend In this example, the title is `Create a Linear issue` <img width="383" alt="Screenshot 2025-05-22 at 10 52 57 AM" src="https://github.com/user-attachments/assets/b07dcb35-91a9-40ad-aff3-0a7be95381fb" />
1 parent 58f9d17 commit 56084b5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/sentry/workflow_engine/endpoints/serializers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class SentryAppContext(TypedDict):
5252
installationId: str
5353
status: int
5454
settings: NotRequired[dict[str, Any]]
55+
title: NotRequired[str]
5556

5657

5758
class ActionHandlerSerializerResponse(TypedDict):
@@ -102,14 +103,17 @@ def serialize(
102103
sentry_app_context = kwargs.get("sentry_app_context")
103104
if sentry_app_context:
104105
installation = sentry_app_context.installation
106+
component = sentry_app_context.component
105107
sentry_app: SentryAppContext = {
106108
"id": str(installation.sentry_app.id),
107109
"name": installation.sentry_app.name,
108110
"installationId": str(installation.id),
109111
"status": installation.sentry_app.status,
110112
}
111-
if sentry_app_context.component:
112-
sentry_app["settings"] = sentry_app_context.component.app_schema.get("settings", {})
113+
if component:
114+
sentry_app["settings"] = component.app_schema.get("settings", {})
115+
if component.app_schema.get("title"):
116+
sentry_app["title"] = component.app_schema.get("title")
113117
result["sentryApp"] = sentry_app
114118

115119
services = kwargs.get("services")

tests/sentry/workflow_engine/endpoints/test_organization_available_action_index.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def test_sentry_apps(self):
355355
"installationId": str(self.sentry_app_installation.id),
356356
"status": SentryAppStatus.as_str(self.sentry_app.status),
357357
"settings": ANY,
358+
"title": ANY,
358359
},
359360
},
360361
{
@@ -458,6 +459,7 @@ class PluginActionHandler(ActionHandler):
458459
"installationId": str(self.sentry_app_installation.id),
459460
"status": SentryAppStatus.as_str(self.sentry_app.status),
460461
"settings": ANY,
462+
"title": ANY,
461463
},
462464
},
463465
{

0 commit comments

Comments
 (0)