change methods to private

Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
This commit is contained in:
Ainhoa Larumbe
2021-11-22 09:41:00 +00:00
parent 000c12384e
commit 73438d1ff1
2 changed files with 5 additions and 9 deletions
-5
View File
@@ -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;
}