@@ -261,7 +261,11 @@ class HistoryItemRenderer implements ITreeRenderer<SCMHistoryItemViewModelTreeEl
261
261
return [ ] ;
262
262
}
263
263
264
- return [ currentHistoryItemGroup . name , currentHistoryItemGroup . remote ?. name ?? '' , currentHistoryItemGroup . base ?. name ?? '' ] ;
264
+ return [
265
+ currentHistoryItemGroup . name ,
266
+ currentHistoryItemGroup . remote ?. name ,
267
+ currentHistoryItemGroup . base ?. name ]
268
+ . filter ( l => l !== undefined ) ;
265
269
}
266
270
267
271
private getTooltip ( element : SCMHistoryItemViewModelTreeElement ) : IManagedHoverTooltipMarkdownString {
@@ -306,15 +310,19 @@ class HistoryItemRenderer implements ITreeRenderer<SCMHistoryItemViewModelTreeEl
306
310
}
307
311
}
308
312
309
- if ( historyItem . labels ) {
313
+ const labels = this . getLabels ( element . repository ) ;
314
+ const historyItemLabels = ( historyItem . labels ?? [ ] )
315
+ . filter ( l => labels . includes ( l . title ) ) ;
316
+
317
+ if ( historyItemLabels ) {
310
318
const historyItemGroupLocalColor = colorTheme . getColor ( historyItemGroupLocal ) ;
311
319
const historyItemGroupRemoteColor = colorTheme . getColor ( historyItemGroupRemote ) ;
312
320
const historyItemGroupBaseColor = colorTheme . getColor ( historyItemGroupBase ) ;
313
321
314
322
const historyItemGroupHoverLabelForegroundColor = colorTheme . getColor ( historyItemGroupHoverLabelForeground ) ;
315
323
316
324
markdown . appendMarkdown ( `\n\n---\n\n` ) ;
317
- markdown . appendMarkdown ( historyItem . labels . map ( label => {
325
+ markdown . appendMarkdown ( historyItemLabels . map ( label => {
318
326
const historyItemGroupHoverLabelBackgroundColor =
319
327
label . title === currentHistoryItemGroup ?. name ? historyItemGroupLocalColor :
320
328
label . title === currentHistoryItemGroup ?. remote ?. name ? historyItemGroupRemoteColor :
0 commit comments