Merge pull request #7852 from awanlin/topic/add-entity-pull-requests

Added entity view for Azure Repo Pull Requests
This commit is contained in:
Fredrik Adelöw
2021-11-17 19:20:27 +01:00
committed by GitHub
26 changed files with 764 additions and 24 deletions
@@ -35,6 +35,7 @@ import {
} from '@backstage/plugin-api-docs';
import {
EntityAzurePipelinesContent,
EntityAzurePullRequestsContent,
isAzureDevOpsAvailable,
} from '@backstage/plugin-azure-devops';
import { EntityBadgesDialog } from '@backstage/plugin-badges';
@@ -264,6 +265,18 @@ const errorsContent = (
</EntitySwitch>
);
const pullRequestsContent = (
<EntitySwitch>
<EntitySwitch.Case if={isAzureDevOpsAvailable}>
<EntityAzurePullRequestsContent defaultLimit={25} />
</EntitySwitch.Case>
<EntitySwitch.Case>
<EntityGithubPullRequestsContent />
</EntitySwitch.Case>
</EntitySwitch>
);
const overviewContent = (
<Grid container spacing={3} alignItems="stretch">
{entityWarningContent}
@@ -368,7 +381,7 @@ const serviceEntityPage = (
</EntityLayout.Route>
<EntityLayout.Route path="/pull-requests" title="Pull Requests">
<EntityGithubPullRequestsContent />
{pullRequestsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/code-insights" title="Code Insights">
@@ -427,7 +440,7 @@ const websiteEntityPage = (
</EntityLayout.Route>
<EntityLayout.Route path="/pull-requests" title="Pull Requests">
<EntityGithubPullRequestsContent />
{pullRequestsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/code-insights" title="Code Insights">