catalog: suffix entiy kind typeswith Entity
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
---
|
||||
apiVersion: backstage.io/v1beta1
|
||||
kind: LocationRef
|
||||
kind: Location
|
||||
metadata:
|
||||
name: location-1
|
||||
spec:
|
||||
@@ -26,7 +26,7 @@ import { AnnotateLocationEntityProcessor } from './processors/AnnotateLocationEn
|
||||
import { EntityPolicyProcessor } from './processors/EntityPolicyProcessor';
|
||||
import { FileReaderProcessor } from './processors/FileReaderProcessor';
|
||||
import { GithubReaderProcessor } from './processors/GithubReaderProcessor';
|
||||
import { LocationRefProcessor } from './processors/LocationRefProcessor';
|
||||
import { LocationRefProcessor } from './processors/LocationEntityProcessor';
|
||||
import * as result from './processors/results';
|
||||
import {
|
||||
LocationProcessor,
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Entity, LocationRef, LocationSpec } from '@backstage/catalog-model';
|
||||
import { Entity, LocationEntity, LocationSpec } from '@backstage/catalog-model';
|
||||
import * as result from './results';
|
||||
import { LocationProcessor, LocationProcessorEmit } from './types';
|
||||
|
||||
@@ -24,8 +24,8 @@ export class LocationRefProcessor implements LocationProcessor {
|
||||
_location: LocationSpec,
|
||||
emit: LocationProcessorEmit,
|
||||
): Promise<Entity> {
|
||||
if (entity.kind === 'LocationRef') {
|
||||
const location = entity as LocationRef;
|
||||
if (entity.kind === 'Location') {
|
||||
const location = entity as LocationEntity;
|
||||
if (location.spec.target) {
|
||||
emit(
|
||||
result.location(
|
||||
Reference in New Issue
Block a user