From 252b2ebfd4635e0586faa674e3998f164c28e0a5 Mon Sep 17 00:00:00 2001 From: Gisela Torres Date: Sun, 21 Apr 2024 23:51:06 +0200 Subject: [PATCH] Update discovery.md Signed-off-by: Gisela Torres --- docs/integrations/github/discovery.md | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/docs/integrations/github/discovery.md b/docs/integrations/github/discovery.md index 93ab00146e..d0721e06f6 100644 --- a/docs/integrations/github/discovery.md +++ b/docs/integrations/github/discovery.md @@ -26,27 +26,11 @@ package. yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-github ``` -And then add the entity provider to your catalog builder: +And then update your backend by adding the following line: -```ts title="packages/backend/src/plugins/catalog.ts" -/* highlight-add-next-line */ -import { GithubEntityProvider } from '@backstage/plugin-catalog-backend-module-github'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const builder = await CatalogBuilder.create(env); - /* highlight-add-start */ - builder.addEntityProvider( - GithubEntityProvider.fromConfig(env.config, { - logger: env.logger, - scheduler: env.scheduler, - }), - ); - /* highlight-add-end */ - - // .. -} +```ts title="packages/backend/src/index.ts" +// github discovery +backend.add(import('@backstage/plugin-catalog-backend-module-github/alpha')); ``` ## Installation with Events Support