refactor: update sentry feed content

This commit is contained in:
moonrailgun 2024-09-10 23:24:28 +08:00
parent e770e42893
commit 1895ac772c

View File

@ -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<string>(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'],