( notification: GitifyNotification, )
| 121 | * @returns The display title string. |
| 122 | */ |
| 123 | export function formatNotificationTitle( |
| 124 | notification: GitifyNotification, |
| 125 | ): string { |
| 126 | let title = notification.subject.title; |
| 127 | const number = formatNotificationNumber(notification); |
| 128 | |
| 129 | if (number.length > 0) { |
| 130 | title = `${title} [${number}]`; |
| 131 | } |
| 132 | |
| 133 | return title; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Helper to format the metric description, determine singular or plural noun, |
no test coverage detected