Skip to content

Commit f350076

Browse files
committed
address sonar feedback
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent ef030df commit f350076

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/renderer/components/metrics/MetricGroup.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export const MetricGroup: FC<MetricGroupProps> = ({
3030
const linkedIssuesPillDescription = formatMetricDescription(
3131
linkedIssues.length,
3232
'issue',
33-
(count, noun) => `Linked to ${count} ${noun}: ${linkedIssues.join(', ')}`,
33+
(count, noun) => {
34+
return `Linked to ${count} ${noun}: ${linkedIssues.join(', ')}`;
35+
},
3436
);
3537

3638
const reactionCount = notification.subject.reactionsCount ?? 0;
@@ -64,6 +66,7 @@ export const MetricGroup: FC<MetricGroupProps> = ({
6466
})
6567
.filter(Boolean)
6668
.join(' ');
69+
6770
return `${count} ${noun}: ${formatted}`;
6871
},
6972
);
@@ -81,8 +84,15 @@ export const MetricGroup: FC<MetricGroupProps> = ({
8184
const labelsPillDescription = formatMetricDescription(
8285
labelsCount,
8386
'label',
84-
(count, noun) =>
85-
`${count} ${noun}: ${labels.map((label) => `🏷️ ${label}`).join(', ')}`,
87+
(count, noun) => {
88+
const formatted = labels
89+
.map((label) => {
90+
return `🏷️ ${label}`.trim();
91+
})
92+
.join(' ');
93+
94+
return `${count} ${noun}: ${formatted}`;
95+
},
8696
);
8797

8898
const milestone = notification.subject.milestone;

0 commit comments

Comments
 (0)