diff --git a/.changeset/chatty-pears-nail.md b/.changeset/chatty-pears-nail.md new file mode 100644 index 0000000000..646841fb58 --- /dev/null +++ b/.changeset/chatty-pears-nail.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Fix wrong return type of the `isGroupEntity` function. diff --git a/plugins/catalog-backend/src/search/util.ts b/plugins/catalog-backend/src/search/util.ts index 7e7ce7064e..b5df2a28a7 100644 --- a/plugins/catalog-backend/src/search/util.ts +++ b/plugins/catalog-backend/src/search/util.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import { Entity, UserEntity } from '@backstage/catalog-model'; +import { Entity, UserEntity, GroupEntity } from '@backstage/catalog-model'; function isUserEntity(entity: Entity): entity is UserEntity { return entity.kind.toLocaleUpperCase('en-US') === 'USER'; } -function isGroupEntity(entity: Entity): entity is UserEntity { +function isGroupEntity(entity: Entity): entity is GroupEntity { return entity.kind.toLocaleUpperCase('en-US') === 'GROUP'; }