Merge pull request #8069 from goenning/fix-techinsights-docs

Fix techinsights docs: replaced DefaultTechInsightsBuilder with buildTechInsightsContext
This commit is contained in:
Fredrik Adelöw
2021-11-22 14:41:26 +01:00
committed by GitHub
3 changed files with 10 additions and 4 deletions
+6
View File
@@ -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: {
+2 -2
View File
@@ -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,