Files
backstage/plugins/events-backend-module-azure
github-actions[bot] b228d7d9c2 Version Packages
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-09-20 11:24:40 +02:00
..
2023-09-20 11:24:40 +02:00
2023-09-20 11:24:40 +02:00

events-backend-module-azure

Welcome to the events-backend-module-azure backend plugin!

This plugin is a module for the events-backend backend plugin and extends it with an AzureDevOpsEventRouter.

The event router will subscribe to the topic azureDevOps and route the events to more concrete topics based on the value of the provided $.eventType payload field.

Examples:

$.eventType topic
git.push azureDevOps.git.push
git.pullrequest.created azureDevOps.git.pullrequest.created

Please find all possible webhook event types at the official documentation of events and webhooks.

Installation

Install the events-backend plugin.

Install this module:

# From your Backstage root directory
yarn add --cwd packages/backend @backstage/plugin-events-backend-module-azure

Add the event router to the EventsBackend instance in packages/backend/src/plugins/events.ts:

+const azureEventRouter = new AzureDevOpsEventRouter();

new EventsBackend(env.logger)
+  .addPublishers(azureEventRouter)
+  .addSubscribers(azureEventRouter);
// [...]