@@ -128,7 +128,11 @@ export default async function createPlugin(
|
||||
): Promise<Router> {
|
||||
const builder = await CatalogBuilder.create(env);
|
||||
/* highlight-add-next-line */
|
||||
builder.addProcessor(AzureDevOpsDiscoveryProcessor.fromConfig(env.config, { logger: env.logger }));
|
||||
builder.addProcessor(
|
||||
AzureDevOpsDiscoveryProcessor.fromConfig(env.config, {
|
||||
logger: env.logger,
|
||||
}),
|
||||
);
|
||||
|
||||
// ..
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ For large organizations, this plugin can take a long time, so be careful setting
|
||||
import { MicrosoftGraphOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-msgraph';
|
||||
|
||||
export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
env: PluginEnvironment,
|
||||
): Promise<Router> {
|
||||
const builder = await CatalogBuilder.create(env);
|
||||
|
||||
@@ -55,7 +55,7 @@ export default async function createPlugin(
|
||||
schedule: env.scheduler.createScheduledTaskRunner({
|
||||
frequency: { hours: 1 },
|
||||
timeout: { minutes: 50 },
|
||||
initialDelay: { seconds: 15}
|
||||
initialDelay: { seconds: 15 },
|
||||
}),
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -105,8 +105,8 @@ export default async function createCatalogEventBasedProviders(
|
||||
}),
|
||||
);
|
||||
/* highlight-add-end */
|
||||
return providers.flat();
|
||||
}
|
||||
return providers.flat();
|
||||
}
|
||||
```
|
||||
|
||||
**Attention:**
|
||||
|
||||
@@ -44,7 +44,7 @@ export default async function createPlugin(
|
||||
schedule: env.scheduler.createScheduledTaskRunner({
|
||||
frequency: { minutes: 30 },
|
||||
timeout: { minutes: 3 },
|
||||
}),
|
||||
}),
|
||||
// optional: alternatively, use schedule
|
||||
scheduler: env.scheduler,
|
||||
}),
|
||||
@@ -88,14 +88,14 @@ export default async function createCatalogEventBasedProviders(
|
||||
/* highlight-add-start */
|
||||
providers.push(
|
||||
GithubEntityProvider.fromConfig(env.config, {
|
||||
logger: env.logger,
|
||||
// optional: alternatively, use scheduler with schedule defined in app-config.yaml
|
||||
schedule: env.scheduler.createScheduledTaskRunner({
|
||||
frequency: { minutes: 30 },
|
||||
timeout: { minutes: 3 },
|
||||
}),
|
||||
// optional: alternatively, use schedule
|
||||
scheduler: env.scheduler,
|
||||
logger: env.logger,
|
||||
// optional: alternatively, use scheduler with schedule defined in app-config.yaml
|
||||
schedule: env.scheduler.createScheduledTaskRunner({
|
||||
frequency: { minutes: 30 },
|
||||
timeout: { minutes: 3 },
|
||||
}),
|
||||
// optional: alternatively, use schedule
|
||||
scheduler: env.scheduler,
|
||||
}),
|
||||
);
|
||||
/* highlight-add-end */
|
||||
@@ -269,7 +269,7 @@ import {
|
||||
} from '@backstage/plugin-catalog-backend-module-github';
|
||||
import {
|
||||
ScmIntegrations,
|
||||
DefaultGithubCredentialsProvider
|
||||
DefaultGithubCredentialsProvider,
|
||||
} from '@backstage/integration';
|
||||
/* highlight-add-end */
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ import { PluginEnvironment } from '../types';
|
||||
export default async function createCatalogEventBasedProviders(
|
||||
/* highlight-remove-next-line */
|
||||
_: PluginEnvironment,
|
||||
/* highlight-add-next-line */
|
||||
/* highlight-add-next-line */
|
||||
env: PluginEnvironment,
|
||||
): Promise<Array<EntityProvider & EventSubscriber>> {
|
||||
const providers: Array<
|
||||
|
||||
@@ -99,7 +99,7 @@ export default async function createPlugin(
|
||||
const builder = await CatalogBuilder.create(env);
|
||||
/* highlight-add-start */
|
||||
builder.addProcessor(
|
||||
GitLabDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
||||
GitLabDiscoveryProcessor.fromConfig(env.config, { logger: env.logger }),
|
||||
);
|
||||
/* highlight-add-end */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user