From 1895ac772cec64c92c490a1a06d78df2eae05191 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 10 Sep 2024 23:24:28 +0800 Subject: [PATCH] refactor: update sentry feed content --- src/server/trpc/routers/feed/integration.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/trpc/routers/feed/integration.ts b/src/server/trpc/routers/feed/integration.ts index 29f96a1..1f80c92 100644 --- a/src/server/trpc/routers/feed/integration.ts +++ b/src/server/trpc/routers/feed/integration.ts @@ -277,6 +277,7 @@ export const feedIntegrationRouter = router({ const action = get(data, 'action'); if (eventType === 'event_alert' && action === 'triggered') { + const title = get(data, 'data.event.title'); const message = get(data, 'data.event.message'); const tags = fromPairs(get(data as any, 'data.event.tags')); const url = String(get(data, 'data.event.web_url')); @@ -286,7 +287,7 @@ export const feedIntegrationRouter = router({ await createFeedEvent(workspaceId, { channelId: channelId, eventName: 'alert', - eventContent: `${message}`, + eventContent: `${title} | ${message}`, tags: compact([ tags['environment'], tags['release'],