Merge pull request #8069 from goenning/fix-techinsights-docs
Fix techinsights docs: replaced DefaultTechInsightsBuilder with buildTechInsightsContext
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-tech-insights-backend': patch
|
||||
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
|
||||
---
|
||||
|
||||
Update README docs to use correct function/parameter names
|
||||
@@ -24,7 +24,7 @@ and modify the `techInsights.ts` file to contain a reference to the FactCheckers
|
||||
+ logger,
|
||||
+}),
|
||||
|
||||
const builder = new DefaultTechInsightsBuilder({
|
||||
const builder = buildTechInsightsContext({
|
||||
logger,
|
||||
config,
|
||||
database,
|
||||
@@ -59,7 +59,7 @@ export const exampleCheck: TechInsightJsonRuleCheck = {
|
||||
name: 'demodatacheck', // A human readable name of this check to be displayed in the UI
|
||||
type: JSON_RULE_ENGINE_CHECK_TYPE, // Type identifier of the check. Used to run logic against, determine persistence option to use and render correct components on the UI
|
||||
description: 'A fact check for demoing purposes', // A description to be displayed in the UI
|
||||
factRefs: ['demo-poc.factretriever'], // References to fact containers that this check uses. See documentation on FactRetrievers for more information on these
|
||||
factIds: ['documentation-number-factretriever'], // References to fact ids that this check uses. See documentation on FactRetrievers for more information on these
|
||||
rule: {
|
||||
// The actual rule
|
||||
conditions: {
|
||||
|
||||
@@ -22,7 +22,7 @@ do this by creating a file called `packages/backend/src/plugins/techInsights.ts`
|
||||
```ts
|
||||
import {
|
||||
createRouter,
|
||||
DefaultTechInsightsBuilder,
|
||||
buildTechInsightsContext,
|
||||
} from '@backstage/plugin-tech-insights-backend';
|
||||
import { Router } from 'express';
|
||||
import { PluginEnvironment } from '../types';
|
||||
@@ -33,7 +33,7 @@ export default async function createPlugin({
|
||||
discovery,
|
||||
database,
|
||||
}: PluginEnvironment): Promise<Router> {
|
||||
const builder = new DefaultTechInsightsBuilder({
|
||||
const builder = buildTechInsightsContext({
|
||||
logger,
|
||||
config,
|
||||
database,
|
||||
|
||||
Reference in New Issue
Block a user