Add public annotations to api-report
Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
@@ -37,6 +37,11 @@ import { Item, Select } from '../Select';
|
||||
*/
|
||||
export const GOCD_PIPELINES_ANNOTATION = 'gocd.org/pipelines';
|
||||
|
||||
/**
|
||||
* Returns true if GoCD annotation is present in the given entity.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const isGoCdAvailable = (entity: Entity): boolean =>
|
||||
Boolean(entity.metadata.annotations?.[GOCD_PIPELINES_ANNOTATION]);
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
import { gocdPlugin } from './plugin';
|
||||
import { createComponentExtension } from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* GoCD builds table component.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const EntityGoCdContent = gocdPlugin.provide(
|
||||
createComponentExtension({
|
||||
name: 'EntityGoCdContent',
|
||||
|
||||
@@ -26,6 +26,11 @@ export const gocdApiRef = createApiRef<GoCdApi>({
|
||||
id: 'plugin.gocd.service',
|
||||
});
|
||||
|
||||
/**
|
||||
* Plugin definition.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const gocdPlugin = createPlugin({
|
||||
id: 'gocd',
|
||||
apis: [
|
||||
|
||||
Reference in New Issue
Block a user