From d8d46777c8be67b007f747d7f1ac0d1b84c334ae Mon Sep 17 00:00:00 2001 From: mo Date: Tue, 3 May 2022 11:24:13 -0500 Subject: [PATCH] README git tags Signed-off-by: mo --- plugins/azure-devops/README.md | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/plugins/azure-devops/README.md b/plugins/azure-devops/README.md index a55ed983b7..fc97001338 100644 --- a/plugins/azure-devops/README.md +++ b/plugins/azure-devops/README.md @@ -16,6 +16,8 @@ Lists the top _n_ Active, Completed, or Abandoned Pull Requests for a given repo ![Azure Repos Pull Requests Example](./docs/azure-devops-pull-requests.png) +Additional Git Tags component that lists all git tags for a given Azure Repo + ## Setup The following sections will help you get the Azure DevOps plugin setup and running @@ -155,6 +157,42 @@ To get the Azure Repos component working you'll need to do the following two ste - The `if` prop is optional on the `EntityLayout.Route`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation - The `defaultLimit` property on the `EntityAzurePullRequestsContent` will set the max number of Pull Requests you would like to see, if not set this will default to 10 +### Git Tags Component + +To get the Git Tags component working you'll need to do the following two steps: + +1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + +2. Second we need to add the `EntityAzureGitTagsContent` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureGitTagsContent, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // For example in the Service section + const serviceEntityPage = ( + + // ... + + + + // ... + + ``` + +**Notes:** + +- You'll need to add the `EntityLayout.Route` above from step 2 to all the entity sections you want to see Git Tags in. For example if you wanted to see Pull Requests when looking at Website entities then you would need to add this to the `websiteEntityPage` section. +- The `if` prop is optional on the `EntityLayout.Route`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + ## Limitations - Currently multiple organizations are not supported