@backstage-community/plugin-catalog-backend-module-scaffolder-relation-processor 2.17.0 → 2.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @backstage-community/plugin-catalog-backend-module-scaffolder-relation-processor
2
2
 
3
+ ## 2.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a3e0c82: Fixed template update notifications not being sent for entities with object or array format scaffoldedFrom
8
+ - bf47fd9: Updated dependency `@octokit/core` to `^7.0.0`.
9
+
10
+ ## 2.17.1
11
+
12
+ ### Patch Changes
13
+
14
+ - cb68dc9: Uses the Backstage 1.54.5 versions of the events and notifications packages instead of older pinned dependencies.
15
+
3
16
  ## 2.17.0
4
17
 
5
18
  ### Minor Changes
package/README.md CHANGED
@@ -67,7 +67,7 @@ These relations should also appear on the `EntityCatalogGraphView` component fro
67
67
 
68
68
  ## Template Update Notifications
69
69
 
70
- This plugin includes a notification feature that automatically notifies entity owners when the scaffolder template used to create their entities has been updated to a new version. When a template update is detected, the plugin finds all entities that were scaffolded from that template (using the `spec.scaffoldedFrom` field) and notifies the owners of those entities.
70
+ This plugin includes a notification feature that automatically notifies entity owners when the scaffolder template used to create their entities has been updated to a new version. When a template update is detected, the plugin finds all entities that were scaffolded from that template (using the `relations.scaffoldedFrom` field) and notifies the owners of those entities.
71
71
 
72
72
  ### Prerequisites
73
73
 
@@ -112,7 +112,7 @@ Both the title and description support the following template variables:
112
112
 
113
113
  1. A scaffolder template `template:default/my-service-template` is updated from version `1.0.0` to `1.1.0`
114
114
  2. The plugin detects this version change and emits a `relationProcessor.template:version_updated` event
115
- 3. The plugin queries the catalog for all entities with `spec.scaffoldedFrom: 'template:default/my-service-template'`
115
+ 3. The plugin queries the catalog for all entities with `relations.scaffoldedFrom: 'template:default/my-service-template'`
116
116
  4. For each found entity, notifications are sent to all entities listed in the `ownedBy` relations
117
117
  5. The notification includes a link to the entity's catalog page and the configured message
118
118
 
@@ -96,7 +96,7 @@ async function handleTemplateUpdateNotifications(catalogClient, notifications, a
96
96
  });
97
97
  const scaffoldedEntities = await catalogClient.getEntities(
98
98
  {
99
- filter: { "spec.scaffoldedFrom": payload.entityRef },
99
+ filter: { "relations.scaffoldedFrom": payload.entityRef },
100
100
  fields: [
101
101
  "kind",
102
102
  "metadata.namespace",
@@ -1 +1 @@
1
- {"version":3,"file":"templateVersionUtils.cjs.js","sources":["../src/templateVersionUtils.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { CatalogProcessorCache } from '@backstage/plugin-catalog-node';\nimport type { EventsService } from '@backstage/plugin-events-node';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport {\n NotificationService,\n NotificationRecipients,\n} from '@backstage/plugin-notifications-node';\nimport { AuthService } from '@backstage/backend-plugin-api';\nimport { NotificationPayload } from '@backstage/plugin-notifications-common';\nimport type { Entity } from '@backstage/catalog-model';\nimport {\n DEFAULT_NOTIFICATION_DESCRIPTION,\n DEFAULT_NOTIFICATION_DESCRIPTION_WITH_PR,\n DEFAULT_NOTIFICATION_ENABLED,\n DEFAULT_NOTIFICATION_TITLE,\n DEFAULT_NOTIFICATION_TITLE_WITH_PR,\n DEFAULT_PR_ENABLED,\n ENTITY_DISPLAY_NAME_TEMPLATE_VAR,\n PR_CREATION_FAILED_PREFIX,\n PR_LINK_TEMPLATE_VAR,\n TEMPLATE_UPDATE_PRS_DOCS_URL,\n TEMPLATE_VERSION_UPDATED_TOPIC,\n} from './constants';\nimport { ScaffolderRelationProcessorConfig } from './types';\nimport type { Config } from '@backstage/config';\nimport { LoggerService, UrlReaderService } from '@backstage/backend-plugin-api';\nimport { handleTemplateUpdatePullRequest } from './pullRequests';\nimport type { VcsProviderRegistry } from './pullRequests/vcs/VcsProviderRegistry';\nimport type { PullRequestResult } from './pullRequests/vcs/VcsProvider';\n\n/**\n * Cache structure for storing template version information\n *\n * @internal\n */\nexport interface TemplateVersionCache {\n version: string;\n}\n\n/**\n * Handles template version checking and caching\n *\n * @param entityRef - The string reference of the template entity\n * @param currentVersion - The current version of the template\n * @param cache - The catalog processor cache\n * @param eventsService - The events service for emitting events\n *\n * @internal\n */\nexport async function handleTemplateVersion(\n entityRef: string,\n currentVersion: string,\n cache: CatalogProcessorCache,\n eventsService?: EventsService,\n): Promise<void> {\n const cacheKey = `template-version-${entityRef}`;\n const cachedData = (await cache.get(cacheKey)) as\n | TemplateVersionCache\n | undefined;\n\n if (cachedData && cachedData.version < currentVersion) {\n if (eventsService) {\n await eventsService.publish({\n topic: TEMPLATE_VERSION_UPDATED_TOPIC,\n eventPayload: {\n entityRef,\n previousVersion: cachedData.version,\n currentVersion,\n },\n });\n }\n }\n\n await cache.set(cacheKey, {\n version: currentVersion,\n });\n}\n\n/**\n * Generates a catalog URL for an entity\n *\n * @param entity - The entity to generate URL for\n * @returns The catalog URL path for the entity\n *\n * @internal\n */\nfunction createEntityCatalogUrl(entity: Entity): string {\n const namespace = entity.metadata.namespace || 'default';\n const encodedNamespace = encodeURIComponent(namespace.toLowerCase());\n const encodedKind = encodeURIComponent(entity.kind.toLowerCase());\n const encodedName = encodeURIComponent(entity.metadata.name.toLowerCase());\n\n return `/catalog/${encodedNamespace}/${encodedKind}/${encodedName}`;\n}\n\n/**\n * Builds a notification payload based on entity, config, and PR result\n *\n * @param entityName - Display name of the entity\n * @param catalogUrl - URL to the entity in the catalog\n * @param config - Configuration for notification title and description\n * @param prResult - Optional PR creation result for this entity\n * @returns NotificationPayload with title, description, and link\n *\n * @internal\n */\nfunction buildNotificationPayload(\n entityName: string,\n catalogUrl: string,\n config: ScaffolderRelationProcessorConfig,\n prResult?: PullRequestResult,\n): NotificationPayload {\n const entityNameRegex = new RegExp(\n ENTITY_DISPLAY_NAME_TEMPLATE_VAR.replace(/\\$/g, '\\\\$'),\n 'g',\n );\n const prLinkRegex = new RegExp(\n PR_LINK_TEMPLATE_VAR.replace(/\\$/g, '\\\\$'),\n 'g',\n );\n\n // Check if PR creation failed - use default message with error prefix\n if (prResult && !prResult.success) {\n const titleReplaced = DEFAULT_NOTIFICATION_TITLE.replace(\n entityNameRegex,\n entityName,\n );\n const title =\n titleReplaced.charAt(0).toUpperCase() + titleReplaced.slice(1);\n\n const baseDescription = DEFAULT_NOTIFICATION_DESCRIPTION.replace(\n entityNameRegex,\n entityName,\n );\n const description = `${PR_CREATION_FAILED_PREFIX}: ${prResult.error}. ${baseDescription} For more information, see the documentation: ${TEMPLATE_UPDATE_PRS_DOCS_URL}`;\n\n return { title, description, link: catalogUrl };\n }\n\n // Normal flow: use configured message\n const messageConfig = config.notifications?.templateUpdate?.message;\n\n const titleReplaced =\n messageConfig?.title.replace(entityNameRegex, entityName) || '';\n const title = titleReplaced.charAt(0).toUpperCase() + titleReplaced.slice(1);\n\n let description =\n messageConfig?.description.replace(entityNameRegex, entityName) || '';\n\n // Replace PR link placeholder with PR URL if available, otherwise remove it\n if (prResult?.success) {\n description = description.replace(prLinkRegex, prResult.url);\n return { title, description, link: prResult.url };\n }\n\n description = description.replace(prLinkRegex, '').trim();\n return { title, description, link: catalogUrl };\n}\n\n/**\n * Sends notifications to owners for each entity that should be updated\n *\n * @param notifications - Notification service to send notifications\n * @param entities - Array of entities that need update notifications sent to their owners\n * @param config - Configuration for notification title and description\n * @param prResults - Optional map of entity names to their PR creation results.\n * If defined (PRs enabled), only entities in this map get notifications.\n * If undefined (PRs disabled), all entities get notifications.\n *\n * @internal\n */\nasync function sendNotificationsToOwners(\n notifications: NotificationService,\n entities: Entity[],\n config: ScaffolderRelationProcessorConfig,\n prResults?: Map<string, PullRequestResult>,\n): Promise<void> {\n for (const entity of entities) {\n const prResult = prResults?.get(entity.metadata.name);\n\n // If PRs are enabled (prResults is defined) but entity is not in the map,\n // it means there were no changes for this entity - skip notification\n if (prResults !== undefined && prResult === undefined) {\n continue;\n }\n\n const ownedByRelations =\n entity.relations?.filter(rel => rel.type === 'ownedBy') || [];\n\n for (const relation of ownedByRelations) {\n const recipients: NotificationRecipients = {\n type: 'entity',\n entityRef: relation.targetRef,\n };\n\n const catalogUrl = createEntityCatalogUrl(entity);\n const entityName = entity.metadata.title ?? entity.metadata.name;\n\n const payload = buildNotificationPayload(\n entityName,\n catalogUrl,\n config,\n prResult,\n );\n\n await notifications.send({\n recipients,\n payload,\n });\n }\n }\n}\n\n/**\n * Handles template update events by optionally creating PRs and sending notifications\n *\n * @param catalogClient - Catalog client to query for entities\n * @param notifications - Notification service to send notifications\n * @param auth - Auth service to get authentication token\n * @param processorConfig - Parsed scaffolder relation processor config\n * @param payload - Template update payload containing entity ref and version info\n * @param logger - Logger service for logging diffs\n * @param urlReader - UrlReaderService for fetching repository files\n * @param vcsRegistry - VCS provider registry\n * @param config - Backstage config for SCM integrations\n *\n * @internal\n */\nexport async function handleTemplateUpdateNotifications(\n catalogClient: CatalogClient,\n notifications: NotificationService,\n auth: AuthService,\n processorConfig: ScaffolderRelationProcessorConfig,\n payload: {\n entityRef: string;\n previousVersion: string;\n currentVersion: string;\n },\n logger: LoggerService,\n urlReader: UrlReaderService,\n vcsRegistry: VcsProviderRegistry,\n config: Config,\n): Promise<void> {\n const { token } = await auth.getPluginRequestToken({\n onBehalfOf: await auth.getOwnServiceCredentials(),\n targetPluginId: 'catalog',\n });\n\n const scaffoldedEntities = await catalogClient.getEntities(\n {\n filter: { 'spec.scaffoldedFrom': payload.entityRef },\n fields: [\n 'kind',\n 'metadata.namespace',\n 'metadata.name',\n 'metadata.title',\n 'metadata.annotations',\n 'relations',\n 'spec',\n ],\n },\n { token },\n );\n\n let prResults: Map<string, PullRequestResult> | undefined;\n\n // Only create PRs if enabled\n if (processorConfig.pullRequests?.templateUpdate?.enabled) {\n prResults = await handleTemplateUpdatePullRequest(\n catalogClient,\n token,\n payload.entityRef,\n logger,\n urlReader,\n vcsRegistry,\n config,\n scaffoldedEntities.items,\n payload.previousVersion,\n payload.currentVersion,\n );\n }\n\n // Only send notifications if enabled\n if (processorConfig.notifications?.templateUpdate?.enabled) {\n await sendNotificationsToOwners(\n notifications,\n scaffoldedEntities.items,\n processorConfig,\n prResults,\n );\n }\n}\n\n/**\n * Reads and parses the scaffolder relation processor configuration\n *\n * @param config - Backstage config\n * @returns Parsed config with defaults\n *\n * @internal\n */\nexport function readScaffolderRelationProcessorConfig(\n config: Config,\n): ScaffolderRelationProcessorConfig {\n const prEnabled =\n config.getOptionalBoolean(\n 'scaffolder.pullRequests.templateUpdate.enabled',\n ) ?? DEFAULT_PR_ENABLED;\n\n // Use PR-specific defaults when PRs are enabled\n const defaultTitle = prEnabled\n ? DEFAULT_NOTIFICATION_TITLE_WITH_PR\n : DEFAULT_NOTIFICATION_TITLE;\n const defaultDescription = prEnabled\n ? DEFAULT_NOTIFICATION_DESCRIPTION_WITH_PR\n : DEFAULT_NOTIFICATION_DESCRIPTION;\n\n return {\n notifications: {\n templateUpdate: {\n enabled:\n config.getOptionalBoolean(\n 'scaffolder.notifications.templateUpdate.enabled',\n ) ?? DEFAULT_NOTIFICATION_ENABLED,\n message: {\n title:\n config.getOptionalString(\n 'scaffolder.notifications.templateUpdate.message.title',\n ) ?? defaultTitle,\n description:\n config.getOptionalString(\n 'scaffolder.notifications.templateUpdate.message.description',\n ) ?? defaultDescription,\n },\n },\n },\n pullRequests: {\n templateUpdate: {\n enabled: prEnabled,\n },\n },\n };\n}\n"],"names":["TEMPLATE_VERSION_UPDATED_TOPIC","ENTITY_DISPLAY_NAME_TEMPLATE_VAR","PR_LINK_TEMPLATE_VAR","titleReplaced","DEFAULT_NOTIFICATION_TITLE","title","DEFAULT_NOTIFICATION_DESCRIPTION","description","PR_CREATION_FAILED_PREFIX","TEMPLATE_UPDATE_PRS_DOCS_URL","handleTemplateUpdatePullRequest","DEFAULT_PR_ENABLED","DEFAULT_NOTIFICATION_TITLE_WITH_PR","DEFAULT_NOTIFICATION_DESCRIPTION_WITH_PR","DEFAULT_NOTIFICATION_ENABLED"],"mappings":";;;;;AAgEA,eAAsB,qBAAA,CACpB,SAAA,EACA,cAAA,EACA,KAAA,EACA,aAAA,EACe;AACf,EAAA,MAAM,QAAA,GAAW,oBAAoB,SAAS,CAAA,CAAA;AAC9C,EAAA,MAAM,UAAA,GAAc,MAAM,KAAA,CAAM,GAAA,CAAI,QAAQ,CAAA;AAI5C,EAAA,IAAI,UAAA,IAAc,UAAA,CAAW,OAAA,GAAU,cAAA,EAAgB;AACrD,IAAA,IAAI,aAAA,EAAe;AACjB,MAAA,MAAM,cAAc,OAAA,CAAQ;AAAA,QAC1B,KAAA,EAAOA,wCAAA;AAAA,QACP,YAAA,EAAc;AAAA,UACZ,SAAA;AAAA,UACA,iBAAiB,UAAA,CAAW,OAAA;AAAA,UAC5B;AAAA;AACF,OACD,CAAA;AAAA,IACH;AAAA,EACF;AAEA,EAAA,MAAM,KAAA,CAAM,IAAI,QAAA,EAAU;AAAA,IACxB,OAAA,EAAS;AAAA,GACV,CAAA;AACH;AAUA,SAAS,uBAAuB,MAAA,EAAwB;AACtD,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,QAAA,CAAS,SAAA,IAAa,SAAA;AAC/C,EAAA,MAAM,gBAAA,GAAmB,kBAAA,CAAmB,SAAA,CAAU,WAAA,EAAa,CAAA;AACnE,EAAA,MAAM,WAAA,GAAc,kBAAA,CAAmB,MAAA,CAAO,IAAA,CAAK,aAAa,CAAA;AAChE,EAAA,MAAM,cAAc,kBAAA,CAAmB,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,aAAa,CAAA;AAEzE,EAAA,OAAO,CAAA,SAAA,EAAY,gBAAgB,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gB,OAAA,EAAS;AAC1D,IAAA,MAAM,yBAAA;AAAA,MACJ,aAAA;AAAA,MACA,kBAAA,CAAmB,KAAA;AAAA,MACnB,eAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AACF;AAUO,SAAS,sCACd,MAAA,EACmC;AACnC,EAAA,MAAM,YACJ,MAAA,CAAO,kBAAA;AAAA,IACL;AAAA,GACF,IAAKC,4BAAA;AAGP,EAAA,MAAM,YAAA,GAAe,YACjBC,4CAAA,GACAR,oCAAA;AACJ,EAAA,MAAM,kBAAA,GAAqB,YACvBS,kDAAA,GACAP,0CAAA;AAEJ,EAAA,OAAO;AAAA,IACL,aAAA,EAAe;AAAA,MACb,cAAA,EAAgB;AAAA,QACd,SACE,MAAA,CAAO,kBAAA;AAAA,UACL;AAAA,SACF,IAAKQ,sCAAA;AAAA,QACP,OAAA,EAAS;AAAA,UACP,OACE,MAAA,CAAO,iBAAA;AAAA,YACL;AAAA,WACF,IAAK,YAAA;AAAA,UACP,aACE,MAAA,CAAO,iBAAA;AAAA,YACL;AAAA,WACF,IAAK;AAAA;AACT;AACF,KACF;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,cAAA,EAAgB;AAAA,QACd,OAAA,EAAS;AAAA;AACX;AACF,GACF;AACF;;;;;;"}
1
+ {"version":3,"file":"templateVersionUtils.cjs.js","sources":["../src/templateVersionUtils.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { CatalogProcessorCache } from '@backstage/plugin-catalog-node';\nimport type { EventsService } from '@backstage/plugin-events-node';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport {\n NotificationService,\n NotificationRecipients,\n} from '@backstage/plugin-notifications-node';\nimport { AuthService } from '@backstage/backend-plugin-api';\nimport { NotificationPayload } from '@backstage/plugin-notifications-common';\nimport type { Entity } from '@backstage/catalog-model';\nimport {\n DEFAULT_NOTIFICATION_DESCRIPTION,\n DEFAULT_NOTIFICATION_DESCRIPTION_WITH_PR,\n DEFAULT_NOTIFICATION_ENABLED,\n DEFAULT_NOTIFICATION_TITLE,\n DEFAULT_NOTIFICATION_TITLE_WITH_PR,\n DEFAULT_PR_ENABLED,\n ENTITY_DISPLAY_NAME_TEMPLATE_VAR,\n PR_CREATION_FAILED_PREFIX,\n PR_LINK_TEMPLATE_VAR,\n TEMPLATE_UPDATE_PRS_DOCS_URL,\n TEMPLATE_VERSION_UPDATED_TOPIC,\n} from './constants';\nimport { ScaffolderRelationProcessorConfig } from './types';\nimport type { Config } from '@backstage/config';\nimport { LoggerService, UrlReaderService } from '@backstage/backend-plugin-api';\nimport { handleTemplateUpdatePullRequest } from './pullRequests';\nimport type { VcsProviderRegistry } from './pullRequests/vcs/VcsProviderRegistry';\nimport type { PullRequestResult } from './pullRequests/vcs/VcsProvider';\n\n/**\n * Cache structure for storing template version information\n *\n * @internal\n */\nexport interface TemplateVersionCache {\n version: string;\n}\n\n/**\n * Handles template version checking and caching\n *\n * @param entityRef - The string reference of the template entity\n * @param currentVersion - The current version of the template\n * @param cache - The catalog processor cache\n * @param eventsService - The events service for emitting events\n *\n * @internal\n */\nexport async function handleTemplateVersion(\n entityRef: string,\n currentVersion: string,\n cache: CatalogProcessorCache,\n eventsService?: EventsService,\n): Promise<void> {\n const cacheKey = `template-version-${entityRef}`;\n const cachedData = (await cache.get(cacheKey)) as\n | TemplateVersionCache\n | undefined;\n\n if (cachedData && cachedData.version < currentVersion) {\n if (eventsService) {\n await eventsService.publish({\n topic: TEMPLATE_VERSION_UPDATED_TOPIC,\n eventPayload: {\n entityRef,\n previousVersion: cachedData.version,\n currentVersion,\n },\n });\n }\n }\n\n await cache.set(cacheKey, {\n version: currentVersion,\n });\n}\n\n/**\n * Generates a catalog URL for an entity\n *\n * @param entity - The entity to generate URL for\n * @returns The catalog URL path for the entity\n *\n * @internal\n */\nfunction createEntityCatalogUrl(entity: Entity): string {\n const namespace = entity.metadata.namespace || 'default';\n const encodedNamespace = encodeURIComponent(namespace.toLowerCase());\n const encodedKind = encodeURIComponent(entity.kind.toLowerCase());\n const encodedName = encodeURIComponent(entity.metadata.name.toLowerCase());\n\n return `/catalog/${encodedNamespace}/${encodedKind}/${encodedName}`;\n}\n\n/**\n * Builds a notification payload based on entity, config, and PR result\n *\n * @param entityName - Display name of the entity\n * @param catalogUrl - URL to the entity in the catalog\n * @param config - Configuration for notification title and description\n * @param prResult - Optional PR creation result for this entity\n * @returns NotificationPayload with title, description, and link\n *\n * @internal\n */\nfunction buildNotificationPayload(\n entityName: string,\n catalogUrl: string,\n config: ScaffolderRelationProcessorConfig,\n prResult?: PullRequestResult,\n): NotificationPayload {\n const entityNameRegex = new RegExp(\n ENTITY_DISPLAY_NAME_TEMPLATE_VAR.replace(/\\$/g, '\\\\$'),\n 'g',\n );\n const prLinkRegex = new RegExp(\n PR_LINK_TEMPLATE_VAR.replace(/\\$/g, '\\\\$'),\n 'g',\n );\n\n // Check if PR creation failed - use default message with error prefix\n if (prResult && !prResult.success) {\n const titleReplaced = DEFAULT_NOTIFICATION_TITLE.replace(\n entityNameRegex,\n entityName,\n );\n const title =\n titleReplaced.charAt(0).toUpperCase() + titleReplaced.slice(1);\n\n const baseDescription = DEFAULT_NOTIFICATION_DESCRIPTION.replace(\n entityNameRegex,\n entityName,\n );\n const description = `${PR_CREATION_FAILED_PREFIX}: ${prResult.error}. ${baseDescription} For more information, see the documentation: ${TEMPLATE_UPDATE_PRS_DOCS_URL}`;\n\n return { title, description, link: catalogUrl };\n }\n\n // Normal flow: use configured message\n const messageConfig = config.notifications?.templateUpdate?.message;\n\n const titleReplaced =\n messageConfig?.title.replace(entityNameRegex, entityName) || '';\n const title = titleReplaced.charAt(0).toUpperCase() + titleReplaced.slice(1);\n\n let description =\n messageConfig?.description.replace(entityNameRegex, entityName) || '';\n\n // Replace PR link placeholder with PR URL if available, otherwise remove it\n if (prResult?.success) {\n description = description.replace(prLinkRegex, prResult.url);\n return { title, description, link: prResult.url };\n }\n\n description = description.replace(prLinkRegex, '').trim();\n return { title, description, link: catalogUrl };\n}\n\n/**\n * Sends notifications to owners for each entity that should be updated\n *\n * @param notifications - Notification service to send notifications\n * @param entities - Array of entities that need update notifications sent to their owners\n * @param config - Configuration for notification title and description\n * @param prResults - Optional map of entity names to their PR creation results.\n * If defined (PRs enabled), only entities in this map get notifications.\n * If undefined (PRs disabled), all entities get notifications.\n *\n * @internal\n */\nasync function sendNotificationsToOwners(\n notifications: NotificationService,\n entities: Entity[],\n config: ScaffolderRelationProcessorConfig,\n prResults?: Map<string, PullRequestResult>,\n): Promise<void> {\n for (const entity of entities) {\n const prResult = prResults?.get(entity.metadata.name);\n\n // If PRs are enabled (prResults is defined) but entity is not in the map,\n // it means there were no changes for this entity - skip notification\n if (prResults !== undefined && prResult === undefined) {\n continue;\n }\n\n const ownedByRelations =\n entity.relations?.filter(rel => rel.type === 'ownedBy') || [];\n\n for (const relation of ownedByRelations) {\n const recipients: NotificationRecipients = {\n type: 'entity',\n entityRef: relation.targetRef,\n };\n\n const catalogUrl = createEntityCatalogUrl(entity);\n const entityName = entity.metadata.title ?? entity.metadata.name;\n\n const payload = buildNotificationPayload(\n entityName,\n catalogUrl,\n config,\n prResult,\n );\n\n await notifications.send({\n recipients,\n payload,\n });\n }\n }\n}\n\n/**\n * Handles template update events by optionally creating PRs and sending notifications\n *\n * @param catalogClient - Catalog client to query for entities\n * @param notifications - Notification service to send notifications\n * @param auth - Auth service to get authentication token\n * @param processorConfig - Parsed scaffolder relation processor config\n * @param payload - Template update payload containing entity ref and version info\n * @param logger - Logger service for logging diffs\n * @param urlReader - UrlReaderService for fetching repository files\n * @param vcsRegistry - VCS provider registry\n * @param config - Backstage config for SCM integrations\n *\n * @internal\n */\nexport async function handleTemplateUpdateNotifications(\n catalogClient: CatalogClient,\n notifications: NotificationService,\n auth: AuthService,\n processorConfig: ScaffolderRelationProcessorConfig,\n payload: {\n entityRef: string;\n previousVersion: string;\n currentVersion: string;\n },\n logger: LoggerService,\n urlReader: UrlReaderService,\n vcsRegistry: VcsProviderRegistry,\n config: Config,\n): Promise<void> {\n const { token } = await auth.getPluginRequestToken({\n onBehalfOf: await auth.getOwnServiceCredentials(),\n targetPluginId: 'catalog',\n });\n\n const scaffoldedEntities = await catalogClient.getEntities(\n {\n filter: { 'relations.scaffoldedFrom': payload.entityRef },\n fields: [\n 'kind',\n 'metadata.namespace',\n 'metadata.name',\n 'metadata.title',\n 'metadata.annotations',\n 'relations',\n 'spec',\n ],\n },\n { token },\n );\n\n let prResults: Map<string, PullRequestResult> | undefined;\n\n // Only create PRs if enabled\n if (processorConfig.pullRequests?.templateUpdate?.enabled) {\n prResults = await handleTemplateUpdatePullRequest(\n catalogClient,\n token,\n payload.entityRef,\n logger,\n urlReader,\n vcsRegistry,\n config,\n scaffoldedEntities.items,\n payload.previousVersion,\n payload.currentVersion,\n );\n }\n\n // Only send notifications if enabled\n if (processorConfig.notifications?.templateUpdate?.enabled) {\n await sendNotificationsToOwners(\n notifications,\n scaffoldedEntities.items,\n processorConfig,\n prResults,\n );\n }\n}\n\n/**\n * Reads and parses the scaffolder relation processor configuration\n *\n * @param config - Backstage config\n * @returns Parsed config with defaults\n *\n * @internal\n */\nexport function readScaffolderRelationProcessorConfig(\n config: Config,\n): ScaffolderRelationProcessorConfig {\n const prEnabled =\n config.getOptionalBoolean(\n 'scaffolder.pullRequests.templateUpdate.enabled',\n ) ?? DEFAULT_PR_ENABLED;\n\n // Use PR-specific defaults when PRs are enabled\n const defaultTitle = prEnabled\n ? DEFAULT_NOTIFICATION_TITLE_WITH_PR\n : DEFAULT_NOTIFICATION_TITLE;\n const defaultDescription = prEnabled\n ? DEFAULT_NOTIFICATION_DESCRIPTION_WITH_PR\n : DEFAULT_NOTIFICATION_DESCRIPTION;\n\n return {\n notifications: {\n templateUpdate: {\n enabled:\n config.getOptionalBoolean(\n 'scaffolder.notifications.templateUpdate.enabled',\n ) ?? DEFAULT_NOTIFICATION_ENABLED,\n message: {\n title:\n config.getOptionalString(\n 'scaffolder.notifications.templateUpdate.message.title',\n ) ?? defaultTitle,\n description:\n config.getOptionalString(\n 'scaffolder.notifications.templateUpdate.message.description',\n ) ?? defaultDescription,\n },\n },\n },\n pullRequests: {\n templateUpdate: {\n enabled: prEnabled,\n },\n },\n };\n}\n"],"names":["TEMPLATE_VERSION_UPDATED_TOPIC","ENTITY_DISPLAY_NAME_TEMPLATE_VAR","PR_LINK_TEMPLATE_VAR","titleReplaced","DEFAULT_NOTIFICATION_TITLE","title","DEFAULT_NOTIFICATION_DESCRIPTION","description","PR_CREATION_FAILED_PREFIX","TEMPLATE_UPDATE_PRS_DOCS_URL","handleTemplateUpdatePullRequest","DEFAULT_PR_ENABLED","DEFAULT_NOTIFICATION_TITLE_WITH_PR","DEFAULT_NOTIFICATION_DESCRIPTION_WITH_PR","DEFAULT_NOTIFICATION_ENABLED"],"mappings":";;;;;AAgEA,eAAsB,qBAAA,CACpB,SAAA,EACA,cAAA,EACA,KAAA,EACA,aAAA,EACe;AACf,EAAA,MAAM,QAAA,GAAW,oBAAoB,SAAS,CAAA,CAAA;AAC9C,EAAA,MAAM,UAAA,GAAc,MAAM,KAAA,CAAM,GAAA,CAAI,QAAQ,CAAA;AAI5C,EAAA,IAAI,UAAA,IAAc,UAAA,CAAW,OAAA,GAAU,cAAA,EAAgB;AACrD,IAAA,IAAI,aAAA,EAAe;AACjB,MAAA,MAAM,cAAc,OAAA,CAAQ;AAAA,QAC1B,KAAA,EAAOA,wCAAA;AAAA,QACP,YAAA,EAAc;AAAA,UACZ,SAAA;AAAA,UACA,iBAAiB,UAAA,CAAW,OAAA;AAAA,UAC5B;A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AAA,EAAc;AAAA,MACZ,cAAA,EAAgB;AAAA,QACd,OAAA,EAAS;AAAA;AACX;AACF,GACF;AACF;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-catalog-backend-module-scaffolder-relation-processor",
3
3
  "description": "The scaffolder-relation-processor backend module for the catalog plugin.",
4
- "version": "2.17.0",
4
+ "version": "2.17.2",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -57,7 +57,7 @@
57
57
  "@backstage/plugin-notifications-common": "^0.2.3",
58
58
  "@backstage/plugin-notifications-node": "^0.2.29",
59
59
  "@gitbeaker/rest": "^43.0.0",
60
- "@octokit/core": "^6.0.0",
60
+ "@octokit/core": "^7.0.0",
61
61
  "git-url-parse": "^16.1.0",
62
62
  "octokit-plugin-create-pull-request": "^6.0.1"
63
63
  },