import { Entity } from '@backstage/catalog-model' ; export const useProjectEntity = ( entity ) => { const projectSlug = entity . metadata ?. annotations ?. [ 'buildkite.com/project-slug' ] as string ; return { owner : projectSlug . split ( '/' ) [ 0 ] , repo : projectSlug . split ( '/' ) [ 1 ] , } ; } ;