README git tags

Signed-off-by: mo <mcassidy@hchb.com>
This commit is contained in:
mo
2022-05-03 11:24:13 -05:00
parent cf3b0fb622
commit d8d46777c8
+38
View File
@@ -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 = (
<EntityLayout>
// ...
<EntityLayout.Route if={isAzureDevOpsAvailable} path="/git-tags" title="Git Tags">
<EntityAzureGitTagsContent />
</EntityLayout.Route>
// ...
</EntityLayout>
```
**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