MCPcopy Index your code
hub / github.com/gitify-app/gitify / formatNotification

Function formatNotification

src/renderer/utils/notifications/formatters.ts:13–31  ·  view source on GitHub ↗
(
  notification: GitifyNotification,
)

Source from the content-addressed store, hash-verified

11 * @returns The notification with populated display property
12 */
13export function formatNotification(
14 notification: GitifyNotification,
15): GitifyNotification {
16 const handler = createNotificationHandler(notification);
17
18 return {
19 ...notification,
20 display: {
21 type: formatNotificationType(notification),
22 number: formatNotificationNumber(notification),
23 title: formatNotificationTitle(notification),
24 icon: {
25 type: handler.iconType(notification),
26 color: handler.iconColor(notification),
27 },
28 defaultUserType: handler.defaultUserType(),
29 },
30 };
31}
32
33/**
34 * Normalise an array of text segments into a single display-ready string.

Callers 1

getAllNotificationsFunction · 0.90

Calls 7

formatNotificationTypeFunction · 0.85
formatNotificationNumberFunction · 0.85
formatNotificationTitleFunction · 0.85
iconTypeMethod · 0.65
iconColorMethod · 0.65
defaultUserTypeMethod · 0.65

Tested by

no test coverage detected