change methods to private
Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,6 @@ import { Router } from 'express';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { UrlReader } from '@backstage/backend-common';
|
||||
import { UserEntity } from '@backstage/catalog-model';
|
||||
import { Validators } from '@backstage/catalog-model';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "AddLocationResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
@@ -765,10 +764,6 @@ export class DefaultCatalogCollator implements DocumentCollator {
|
||||
},
|
||||
): DefaultCatalogCollator;
|
||||
// (undocumented)
|
||||
protected getDocumentText(entity: Entity): string;
|
||||
// (undocumented)
|
||||
protected isUserEntity(entity: Entity): entity is UserEntity;
|
||||
// (undocumented)
|
||||
protected locationTemplate: string;
|
||||
// (undocumented)
|
||||
readonly type: string;
|
||||
|
||||
@@ -81,16 +81,17 @@ export class DefaultCatalogCollator implements DocumentCollator {
|
||||
return formatted.toLowerCase();
|
||||
}
|
||||
|
||||
protected isUserEntity(entity: Entity): entity is UserEntity {
|
||||
private isUserEntity(entity: Entity): entity is UserEntity {
|
||||
return entity.kind === 'User';
|
||||
}
|
||||
|
||||
protected getDocumentText(entity: Entity): string {
|
||||
private getDocumentText(entity: Entity): string {
|
||||
let documentText = entity.metadata.description || '';
|
||||
if (this.isUserEntity(entity)) {
|
||||
if (entity.spec?.profile?.displayName && entity.metadata.description) {
|
||||
if (entity.spec?.profile?.displayName && documentText) {
|
||||
// combine displayName and description
|
||||
documentText = `${entity.spec?.profile?.displayName} : ${entity.metadata.description}`;
|
||||
const displayName = entity.spec?.profile?.displayName;
|
||||
documentText = displayName.concat(' : ', documentText);
|
||||
} else {
|
||||
documentText = entity.spec?.profile?.displayName || documentText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user