Compare commits
14 Commits
@backstage
...
main
Author | SHA1 | Date |
---|---|---|
|
6a65a4cea3 | |
|
c2261cf6ab | |
|
727c25df51 | |
|
ff785e582c | |
|
dcffece576 | |
|
ceeadd1e1a | |
|
7bafbd4fc8 | |
|
0493206694 | |
|
ca3c813046 | |
|
8367480d11 | |
|
6e6b88413f | |
|
4815dfd531 | |
|
c2b33a16aa | |
|
56382c80de |
|
@ -78,6 +78,13 @@ jobs:
|
|||
- name: 'Set release name'
|
||||
id: set_release_name
|
||||
run: node scripts/ci/set-release-name.js ${{ matrix.workspace }} ${{ inputs.release_line || 'main' }}
|
||||
- name: 'Check current and release versions'
|
||||
id: check
|
||||
run: |
|
||||
if [[ "${{ steps.set_release_name.outputs.release_version }}" == "${{ steps.set_release_name.outputs.current_version }}" ]]; then
|
||||
echo "Backstage release version and current workspace version are the same, skipping version bump"
|
||||
exit 1 # Non-zero exit code fails the step and job
|
||||
fi
|
||||
- name: 'Configure git'
|
||||
run: |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
@ -97,7 +104,7 @@ jobs:
|
|||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
- name: Run dedupe
|
||||
working-directory: ./workspaces/${{ matrix.workspace }}
|
||||
run: yarn dedupe
|
||||
run: yarn dedupe
|
||||
- name: 'Check for changes'
|
||||
id: check_for_changes
|
||||
run: |
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,4 @@
|
|||
plugins:
|
||||
- checksum: 8af7b3f2d7d19cacc7a3712f871efcb6208ba283a1f532260b0cba80c2cb66ed772b207b5ba41b8c5d64dd8d5e0c0e15bbb445bd14afac491712965211ba027c
|
||||
path: .yarn/plugins/@yarnpkg/plugin-backstage.cjs
|
||||
spec: 'https://versions.backstage.io/v1/releases/1.42.3/yarn-plugin'
|
|
@ -1,6 +1,7 @@
|
|||
app:
|
||||
title: Azure DevOps Example App
|
||||
baseUrl: http://localhost:3000
|
||||
packages: all
|
||||
|
||||
organization:
|
||||
name: Azure DevOps Example
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "1.41.1"
|
||||
"version": "1.42.3"
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
"directory": "workspaces/azure-devops"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/e2e-test-utils": "^0.1.1",
|
||||
"@backstage/repo-tools": "^0.15.0",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/e2e-test-utils": "backstage:^",
|
||||
"@backstage/repo-tools": "backstage:^",
|
||||
"@changesets/cli": "^2.27.1",
|
||||
"knip": "^5.27.4",
|
||||
"node-gyp": "^10.0.0",
|
||||
|
@ -58,9 +58,5 @@
|
|||
"*.{json,md}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-devops": "workspace:^",
|
||||
"@backstage-community/plugin-azure-devops-backend": "workspace:^"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,29 +20,29 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-devops": "workspace:^",
|
||||
"@backstage/app-defaults": "^1.6.4",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/core-app-api": "^1.18.0",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/integration-react": "^1.2.9",
|
||||
"@backstage/plugin-api-docs": "^0.12.9",
|
||||
"@backstage/plugin-catalog": "^1.31.1",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.21",
|
||||
"@backstage/plugin-catalog-import": "^0.13.3",
|
||||
"@backstage/plugin-catalog-react": "^1.19.1",
|
||||
"@backstage/plugin-org": "^0.6.41",
|
||||
"@backstage/plugin-permission-react": "^0.4.36",
|
||||
"@backstage/plugin-scaffolder": "^1.33.0",
|
||||
"@backstage/plugin-search": "^1.4.28",
|
||||
"@backstage/plugin-search-react": "^1.9.2",
|
||||
"@backstage/plugin-techdocs": "^1.13.2",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.26",
|
||||
"@backstage/plugin-techdocs-react": "^1.3.1",
|
||||
"@backstage/plugin-user-settings": "^0.8.24",
|
||||
"@backstage/theme": "^0.6.7",
|
||||
"@backstage/app-defaults": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/core-app-api": "backstage:^",
|
||||
"@backstage/core-components": "backstage:^",
|
||||
"@backstage/core-plugin-api": "backstage:^",
|
||||
"@backstage/integration-react": "backstage:^",
|
||||
"@backstage/plugin-api-docs": "backstage:^",
|
||||
"@backstage/plugin-catalog": "backstage:^",
|
||||
"@backstage/plugin-catalog-common": "backstage:^",
|
||||
"@backstage/plugin-catalog-graph": "backstage:^",
|
||||
"@backstage/plugin-catalog-import": "backstage:^",
|
||||
"@backstage/plugin-catalog-react": "backstage:^",
|
||||
"@backstage/plugin-org": "backstage:^",
|
||||
"@backstage/plugin-permission-react": "backstage:^",
|
||||
"@backstage/plugin-scaffolder": "backstage:^",
|
||||
"@backstage/plugin-search": "backstage:^",
|
||||
"@backstage/plugin-search-react": "backstage:^",
|
||||
"@backstage/plugin-techdocs": "backstage:^",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "backstage:^",
|
||||
"@backstage/plugin-techdocs-react": "backstage:^",
|
||||
"@backstage/plugin-user-settings": "backstage:^",
|
||||
"@backstage/theme": "backstage:^",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"react": "^18.0.2",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@backstage/test-utils": "backstage:^",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
|
|
@ -25,26 +25,26 @@
|
|||
"@backstage-community/plugin-catalog-backend-module-azure-devops-annotator-processor": "workspace:^",
|
||||
"@backstage-community/plugin-scaffolder-backend-module-azure-devops": "workspace:^",
|
||||
"@backstage-community/plugin-scaffolder-backend-module-dotnet": "workspace:^",
|
||||
"@backstage/backend-defaults": "^0.11.1",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/plugin-app-backend": "^0.5.4",
|
||||
"@backstage/plugin-auth-backend": "^0.25.2",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.10",
|
||||
"@backstage/plugin-auth-node": "^0.6.5",
|
||||
"@backstage/plugin-catalog-backend": "^3.0.0",
|
||||
"@backstage/plugin-catalog-backend-module-logs": "^0.1.12",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.10",
|
||||
"@backstage/plugin-permission-backend": "^0.7.2",
|
||||
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.2.10",
|
||||
"@backstage/plugin-permission-common": "^0.9.1",
|
||||
"@backstage/plugin-permission-node": "^0.10.2",
|
||||
"@backstage/plugin-proxy-backend": "^0.6.4",
|
||||
"@backstage/plugin-scaffolder-backend": "^2.1.0",
|
||||
"@backstage/plugin-search-backend": "^2.0.4",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.3.6",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.4.4",
|
||||
"@backstage/plugin-search-backend-node": "^1.3.13",
|
||||
"@backstage/plugin-techdocs-backend": "^2.0.4",
|
||||
"@backstage/backend-defaults": "backstage:^",
|
||||
"@backstage/config": "backstage:^",
|
||||
"@backstage/plugin-app-backend": "backstage:^",
|
||||
"@backstage/plugin-auth-backend": "backstage:^",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "backstage:^",
|
||||
"@backstage/plugin-auth-node": "backstage:^",
|
||||
"@backstage/plugin-catalog-backend": "backstage:^",
|
||||
"@backstage/plugin-catalog-backend-module-logs": "backstage:^",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "backstage:^",
|
||||
"@backstage/plugin-permission-backend": "backstage:^",
|
||||
"@backstage/plugin-permission-backend-module-allow-all-policy": "backstage:^",
|
||||
"@backstage/plugin-permission-common": "backstage:^",
|
||||
"@backstage/plugin-permission-node": "backstage:^",
|
||||
"@backstage/plugin-proxy-backend": "backstage:^",
|
||||
"@backstage/plugin-scaffolder-backend": "backstage:^",
|
||||
"@backstage/plugin-search-backend": "backstage:^",
|
||||
"@backstage/plugin-search-backend-module-catalog": "backstage:^",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "backstage:^",
|
||||
"@backstage/plugin-search-backend-node": "backstage:^",
|
||||
"@backstage/plugin-techdocs-backend": "backstage:^",
|
||||
"app": "link:../app",
|
||||
"better-sqlite3": "^9.0.0",
|
||||
"dockerode": "^3.3.1",
|
||||
|
@ -53,7 +53,7 @@
|
|||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1"
|
||||
"@backstage/cli": "backstage:^"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
# @backstage-community/plugin-azure-devops-backend
|
||||
|
||||
## 0.20.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 8367480: Backstage version bump to v1.42.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8367480]
|
||||
- @backstage-community/plugin-azure-devops-common@0.14.0
|
||||
|
||||
## 0.19.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-azure-devops-backend",
|
||||
"version": "0.19.0",
|
||||
"version": "0.20.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -35,17 +35,17 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-devops-common": "workspace:^",
|
||||
"@backstage/backend-defaults": "^0.11.1",
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@backstage/integration": "^1.17.1",
|
||||
"@backstage/plugin-auth-node": "^0.6.5",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-catalog-node": "^1.17.2",
|
||||
"@backstage/plugin-permission-common": "^0.9.1",
|
||||
"@backstage/plugin-permission-node": "^0.10.2",
|
||||
"@backstage/backend-defaults": "backstage:^",
|
||||
"@backstage/backend-plugin-api": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/config": "backstage:^",
|
||||
"@backstage/errors": "backstage:^",
|
||||
"@backstage/integration": "backstage:^",
|
||||
"@backstage/plugin-auth-node": "backstage:^",
|
||||
"@backstage/plugin-catalog-common": "backstage:^",
|
||||
"@backstage/plugin-catalog-node": "backstage:^",
|
||||
"@backstage/plugin-permission-common": "backstage:^",
|
||||
"@backstage/plugin-permission-node": "backstage:^",
|
||||
"@types/express": "^4.17.6",
|
||||
"azure-devops-node-api": "^13.0.0",
|
||||
"express": "^4.17.1",
|
||||
|
@ -54,8 +54,8 @@
|
|||
"p-limit": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^1.7.0",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/backend-test-utils": "backstage:^",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@types/lodash": "^4.14.151",
|
||||
"@types/mime-types": "^2.1.0",
|
||||
"@types/supertest": "^6.0.0",
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @backstage-community/plugin-azure-devops-common
|
||||
|
||||
## 0.14.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 8367480: Backstage version bump to v1.42.3
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-azure-devops-common",
|
||||
"version": "0.13.0",
|
||||
"version": "0.14.0",
|
||||
"backstage": {
|
||||
"role": "common-library",
|
||||
"pluginId": "azure-devops",
|
||||
|
@ -41,11 +41,11 @@
|
|||
"test": "backstage-cli package test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-permission-common": "^0.9.1"
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/plugin-catalog-common": "backstage:^",
|
||||
"@backstage/plugin-permission-common": "backstage:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1"
|
||||
"@backstage/cli": "backstage:^"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
# @backstage-community/plugin-azure-devops
|
||||
|
||||
## 0.19.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 8367480: Backstage version bump to v1.42.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8367480]
|
||||
- @backstage-community/plugin-azure-devops-common@0.14.0
|
||||
|
||||
## 0.18.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -412,3 +412,43 @@ async handle(
|
|||
};
|
||||
}
|
||||
```
|
||||
|
||||
## New Frontend System (Alpha)
|
||||
|
||||
The Azure DevOps plugin currently support the New Frontend System via an `/alpha` export, here's how to use it:
|
||||
|
||||
### Use new frontend system
|
||||
|
||||
1. Install the frontend plugin:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
yarn --cwd packages/app add @backstage-community/plugin-azure-devops
|
||||
```
|
||||
|
||||
2. Enable the plugin in your `packages/app(-next)/src/App.tsx`:
|
||||
|
||||
After all other imports:
|
||||
|
||||
```tsx
|
||||
import azureDevOpsPlugin from '@backstage-community/plugin-azure-devops';
|
||||
```
|
||||
|
||||
```tsx
|
||||
export const app = createApp({
|
||||
features: [
|
||||
catalogPlugin,
|
||||
catalogImportPlugin,
|
||||
userSettingsPlugin,
|
||||
azureDevOpsPlugin,
|
||||
// ...
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
Alternatively you can simply use feature discover and skip the above step by adding the following yo your `app-config.yaml` file:
|
||||
|
||||
```yaml
|
||||
app:
|
||||
packages: all
|
||||
```
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-azure-devops",
|
||||
"version": "0.18.0",
|
||||
"version": "0.19.0",
|
||||
"backstage": {
|
||||
"role": "frontend-plugin",
|
||||
"pluginId": "azure-devops",
|
||||
|
@ -52,14 +52,14 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-devops-common": "workspace:^",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/core-compat-api": "^0.4.4",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@backstage/frontend-plugin-api": "^0.10.4",
|
||||
"@backstage/plugin-catalog-react": "^1.19.1",
|
||||
"@backstage/plugin-permission-react": "^0.4.36",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/core-compat-api": "backstage:^",
|
||||
"@backstage/core-components": "backstage:^",
|
||||
"@backstage/core-plugin-api": "backstage:^",
|
||||
"@backstage/errors": "backstage:^",
|
||||
"@backstage/frontend-plugin-api": "backstage:^",
|
||||
"@backstage/plugin-catalog-react": "backstage:^",
|
||||
"@backstage/plugin-permission-react": "backstage:^",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
|
@ -68,9 +68,9 @@
|
|||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/dev-utils": "^1.1.12",
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/dev-utils": "backstage:^",
|
||||
"@backstage/test-utils": "backstage:^",
|
||||
"@testing-library/dom": "^10.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
"@testing-library/react": "^15.0.0",
|
||||
|
|
|
@ -7,17 +7,19 @@
|
|||
|
||||
import { AnyApiFactory } from '@backstage/core-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/core-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: FrontendPlugin<
|
||||
const _default: OverridableFrontendPlugin<
|
||||
{},
|
||||
{},
|
||||
{
|
||||
|
@ -26,15 +28,17 @@ const _default: FrontendPlugin<
|
|||
name: undefined;
|
||||
config: {};
|
||||
configInput: {};
|
||||
output: ConfigurableExtensionDataRef<
|
||||
AnyApiFactory,
|
||||
'core.api.factory',
|
||||
{}
|
||||
>;
|
||||
output: ExtensionDataRef<AnyApiFactory, 'core.api.factory', {}>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends {
|
||||
[x: string]: unknown;
|
||||
},
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'entity-card:azure-devops/readme': ExtensionDefinition<{
|
||||
kind: 'entity-card';
|
||||
|
@ -48,22 +52,22 @@ const _default: FrontendPlugin<
|
|||
type?: 'content' | 'summary' | 'info' | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
EntityCardType,
|
||||
'catalog.entity-card-type',
|
||||
{
|
||||
|
@ -93,35 +97,31 @@ const _default: FrontendPlugin<
|
|||
group?: string | false | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-title',
|
||||
{}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<string, 'catalog.entity-content-title', {}>
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-group',
|
||||
{
|
||||
|
@ -130,10 +130,12 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
defaultPath: string;
|
||||
defaultTitle: string;
|
||||
defaultGroup?:
|
||||
defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
|
||||
path: string;
|
||||
defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
|
||||
title: string;
|
||||
defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
|
||||
group?:
|
||||
| (string & {})
|
||||
| 'development'
|
||||
| 'deployment'
|
||||
|
@ -142,6 +144,7 @@ const _default: FrontendPlugin<
|
|||
| 'operation'
|
||||
| 'observability'
|
||||
| undefined;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
|
@ -162,35 +165,31 @@ const _default: FrontendPlugin<
|
|||
group?: string | false | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-title',
|
||||
{}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<string, 'catalog.entity-content-title', {}>
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-group',
|
||||
{
|
||||
|
@ -199,10 +198,12 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
defaultPath: string;
|
||||
defaultTitle: string;
|
||||
defaultGroup?:
|
||||
defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
|
||||
path: string;
|
||||
defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
|
||||
title: string;
|
||||
defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
|
||||
group?:
|
||||
| (string & {})
|
||||
| 'development'
|
||||
| 'deployment'
|
||||
|
@ -211,6 +212,7 @@ const _default: FrontendPlugin<
|
|||
| 'operation'
|
||||
| 'observability'
|
||||
| undefined;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
|
@ -231,35 +233,31 @@ const _default: FrontendPlugin<
|
|||
group?: string | false | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-title',
|
||||
{}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<string, 'catalog.entity-content-title', {}>
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-group',
|
||||
{
|
||||
|
@ -268,10 +266,12 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
defaultPath: string;
|
||||
defaultTitle: string;
|
||||
defaultGroup?:
|
||||
defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
|
||||
path: string;
|
||||
defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
|
||||
title: string;
|
||||
defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
|
||||
group?:
|
||||
| (string & {})
|
||||
| 'development'
|
||||
| 'deployment'
|
||||
|
@ -280,6 +280,7 @@ const _default: FrontendPlugin<
|
|||
| 'operation'
|
||||
| 'observability'
|
||||
| undefined;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
|
@ -294,9 +295,9 @@ const _default: FrontendPlugin<
|
|||
path?: string | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
|
@ -305,7 +306,8 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
defaultPath: string;
|
||||
defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
import {
|
||||
ApiBlueprint,
|
||||
createApiFactory,
|
||||
PageBlueprint,
|
||||
createFrontendPlugin,
|
||||
discoveryApiRef,
|
||||
|
@ -36,8 +35,8 @@ import { isAzureDevOpsAvailable, isAzurePipelinesAvailable } from '../plugin';
|
|||
|
||||
/** @alpha */
|
||||
export const azureDevOpsApi = ApiBlueprint.make({
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
params: defineParams =>
|
||||
defineParams({
|
||||
api: azureDevOpsApiRef,
|
||||
deps: {
|
||||
discoveryApi: discoveryApiRef,
|
||||
|
@ -46,13 +45,12 @@ export const azureDevOpsApi = ApiBlueprint.make({
|
|||
factory: ({ discoveryApi, fetchApi }) =>
|
||||
new AzureDevOpsClient({ discoveryApi, fetchApi }),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
export const azureDevOpsPullRequestPage = PageBlueprint.make({
|
||||
params: {
|
||||
defaultPath: '/azure-pull-requests',
|
||||
path: '/azure-pull-requests',
|
||||
routeRef: convertLegacyRouteRef(azurePullRequestDashboardRouteRef),
|
||||
loader: () =>
|
||||
import('../components/PullRequestsPage').then(m =>
|
||||
|
@ -65,8 +63,8 @@ export const azureDevOpsPullRequestPage = PageBlueprint.make({
|
|||
export const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({
|
||||
name: 'pipelines',
|
||||
params: {
|
||||
defaultPath: '/pipelines',
|
||||
defaultTitle: 'Pipelines',
|
||||
path: '/pipelines',
|
||||
title: 'Pipelines',
|
||||
filter: isAzurePipelinesAvailable,
|
||||
loader: () =>
|
||||
import('../components/EntityPageAzurePipelines').then(m =>
|
||||
|
@ -79,8 +77,8 @@ export const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({
|
|||
export const azureDevOpsGitTagsEntityContent = EntityContentBlueprint.make({
|
||||
name: 'git-tags',
|
||||
params: {
|
||||
defaultPath: '/git-tags',
|
||||
defaultTitle: 'Git Tags',
|
||||
path: '/git-tags',
|
||||
title: 'Git Tags',
|
||||
filter: isAzureDevOpsAvailable,
|
||||
loader: () =>
|
||||
import('../components/EntityPageAzureGitTags').then(m =>
|
||||
|
@ -94,8 +92,8 @@ export const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(
|
|||
{
|
||||
name: 'pull-requests',
|
||||
params: {
|
||||
defaultPath: '/pull-requests',
|
||||
defaultTitle: 'Pull Requests',
|
||||
path: '/pull-requests',
|
||||
title: 'Pull Requests',
|
||||
filter: isAzureDevOpsAvailable,
|
||||
loader: () =>
|
||||
import('../components/EntityPageAzurePullRequests').then(m =>
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
# @backstage-community/plugin-catalog-backend-module-azure-devops-annotator-processor
|
||||
|
||||
## 0.11.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 8367480: Backstage version bump to v1.42.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8367480]
|
||||
- @backstage-community/plugin-azure-devops-common@0.14.0
|
||||
|
||||
## 0.10.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-catalog-backend-module-azure-devops-annotator-processor",
|
||||
"description": "The azure-devops-annotator-processor backend module for the catalog plugin.",
|
||||
"version": "0.10.0",
|
||||
"version": "0.11.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -31,17 +31,17 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-devops-common": "workspace:^",
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/integration": "^1.17.1",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-catalog-node": "^1.17.2",
|
||||
"@backstage/backend-plugin-api": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/config": "backstage:^",
|
||||
"@backstage/integration": "backstage:^",
|
||||
"@backstage/plugin-catalog-common": "backstage:^",
|
||||
"@backstage/plugin-catalog-node": "backstage:^",
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^1.7.0",
|
||||
"@backstage/cli": "^0.33.1"
|
||||
"@backstage/backend-test-utils": "backstage:^",
|
||||
"@backstage/cli": "backstage:^"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @backstage-community/plugin-scaffolder-backend-module-azure-devops
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 8367480: Backstage version bump to v1.42.3
|
||||
|
||||
## 0.12.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-scaffolder-backend-module-azure-devops",
|
||||
"description": "The azure-devops module for @backstage/plugin-scaffolder-backend",
|
||||
"version": "0.12.0",
|
||||
"version": "0.13.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -39,17 +39,17 @@
|
|||
"postpack": "backstage-cli package postpack"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@backstage/integration": "^1.17.1",
|
||||
"@backstage/plugin-scaffolder-node": "^0.10.0",
|
||||
"@backstage/backend-plugin-api": "backstage:^",
|
||||
"@backstage/config": "backstage:^",
|
||||
"@backstage/errors": "backstage:^",
|
||||
"@backstage/integration": "backstage:^",
|
||||
"@backstage/plugin-scaffolder-node": "backstage:^",
|
||||
"azure-devops-node-api": "^14.1.0",
|
||||
"yaml": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/plugin-scaffolder-node-test-utils": "^0.3.1"
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/plugin-scaffolder-node-test-utils": "backstage:^"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @backstage-community/plugin-scaffolder-backend-module-dotnet
|
||||
|
||||
## 0.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 8367480: Backstage version bump to v1.42.3
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "0.5.0",
|
||||
"version": "0.6.0",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@backstage-community/plugin-scaffolder-backend-module-dotnet",
|
||||
"description": "The azure-devops module for @backstage/plugin-scaffolder-backend",
|
||||
|
@ -39,15 +39,15 @@
|
|||
"postpack": "backstage-cli package postpack"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/plugin-scaffolder-node": "^0.10.0",
|
||||
"@backstage/backend-plugin-api": "backstage:^",
|
||||
"@backstage/plugin-scaffolder-node": "backstage:^",
|
||||
"fs-extra": "^11.3.0",
|
||||
"yaml": "^2.6.0",
|
||||
"zod": "^3.24.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/plugin-scaffolder-node-test-utils": "^0.3.1",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/plugin-scaffolder-node-test-utils": "backstage:^",
|
||||
"@types/fs-extra": "^11"
|
||||
},
|
||||
"files": [
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'@backstage-community/plugin-azure-storage-explorer': minor
|
||||
'@backstage-community/plugin-azure-storage-explorer-backend': minor
|
||||
---
|
||||
|
||||
Backstage version bump to v1.41.1
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "1.40.2"
|
||||
"version": "1.41.1"
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
"directory": "workspaces/azure-storage-explorer"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.0",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/e2e-test-utils": "^0.1.1",
|
||||
"@backstage/repo-tools": "^0.14.0",
|
||||
"@backstage/repo-tools": "^0.15.0",
|
||||
"@changesets/cli": "^2.27.1",
|
||||
"knip": "^5.27.4",
|
||||
"node-gyp": "^9.0.0",
|
||||
|
|
|
@ -20,29 +20,29 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-storage-explorer": "workspace:^",
|
||||
"@backstage/app-defaults": "^1.6.3",
|
||||
"@backstage/catalog-model": "^1.7.4",
|
||||
"@backstage/cli": "^0.33.0",
|
||||
"@backstage/core-app-api": "^1.17.1",
|
||||
"@backstage/core-components": "^0.17.3",
|
||||
"@backstage/core-plugin-api": "^1.10.8",
|
||||
"@backstage/integration-react": "^1.2.8",
|
||||
"@backstage/plugin-api-docs": "^0.12.8",
|
||||
"@backstage/plugin-catalog": "^1.31.0",
|
||||
"@backstage/plugin-catalog-common": "^1.1.4",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.20",
|
||||
"@backstage/plugin-catalog-import": "^0.13.2",
|
||||
"@backstage/plugin-catalog-react": "^1.19.0",
|
||||
"@backstage/plugin-org": "^0.6.40",
|
||||
"@backstage/plugin-permission-react": "^0.4.35",
|
||||
"@backstage/plugin-scaffolder": "^1.32.0",
|
||||
"@backstage/plugin-search": "^1.4.27",
|
||||
"@backstage/plugin-search-react": "^1.9.1",
|
||||
"@backstage/plugin-techdocs": "^1.13.1",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.25",
|
||||
"@backstage/plugin-techdocs-react": "^1.3.0",
|
||||
"@backstage/plugin-user-settings": "^0.8.23",
|
||||
"@backstage/theme": "^0.6.6",
|
||||
"@backstage/app-defaults": "^1.6.4",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/core-app-api": "^1.18.0",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/integration-react": "^1.2.9",
|
||||
"@backstage/plugin-api-docs": "^0.12.9",
|
||||
"@backstage/plugin-catalog": "^1.31.1",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.21",
|
||||
"@backstage/plugin-catalog-import": "^0.13.3",
|
||||
"@backstage/plugin-catalog-react": "^1.19.1",
|
||||
"@backstage/plugin-org": "^0.6.41",
|
||||
"@backstage/plugin-permission-react": "^0.4.36",
|
||||
"@backstage/plugin-scaffolder": "^1.33.0",
|
||||
"@backstage/plugin-search": "^1.4.28",
|
||||
"@backstage/plugin-search-react": "^1.9.2",
|
||||
"@backstage/plugin-techdocs": "^1.13.2",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.26",
|
||||
"@backstage/plugin-techdocs-react": "^1.3.1",
|
||||
"@backstage/plugin-user-settings": "^0.8.24",
|
||||
"@backstage/theme": "^0.6.7",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"react": "^18.0.2",
|
||||
|
@ -51,7 +51,7 @@
|
|||
"react-router-dom": "^6.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.7.9",
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
|
|
@ -22,27 +22,27 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-azure-storage-explorer-backend": "workspace:^",
|
||||
"@backstage/backend-defaults": "^0.11.0",
|
||||
"@backstage/catalog-client": "^1.10.1",
|
||||
"@backstage/config": "^1.3.2",
|
||||
"@backstage/plugin-app-backend": "^0.5.3",
|
||||
"@backstage/plugin-auth-backend": "^0.25.1",
|
||||
"@backstage/plugin-auth-backend-module-github-provider": "^0.3.4",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.9",
|
||||
"@backstage/plugin-auth-node": "^0.6.4",
|
||||
"@backstage/plugin-catalog-backend": "^2.1.0",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.9",
|
||||
"@backstage/plugin-permission-backend": "^0.7.1",
|
||||
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.2.9",
|
||||
"@backstage/plugin-permission-common": "^0.9.0",
|
||||
"@backstage/plugin-permission-node": "^0.10.1",
|
||||
"@backstage/plugin-proxy-backend": "^0.6.3",
|
||||
"@backstage/plugin-scaffolder-backend": "^2.0.0",
|
||||
"@backstage/plugin-search-backend": "^2.0.3",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.3.5",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.4.3",
|
||||
"@backstage/plugin-search-backend-node": "^1.3.12",
|
||||
"@backstage/plugin-techdocs-backend": "^2.0.3",
|
||||
"@backstage/backend-defaults": "^0.11.1",
|
||||
"@backstage/catalog-client": "^1.10.2",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/plugin-app-backend": "^0.5.4",
|
||||
"@backstage/plugin-auth-backend": "^0.25.2",
|
||||
"@backstage/plugin-auth-backend-module-github-provider": "^0.3.5",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.10",
|
||||
"@backstage/plugin-auth-node": "^0.6.5",
|
||||
"@backstage/plugin-catalog-backend": "^3.0.0",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.10",
|
||||
"@backstage/plugin-permission-backend": "^0.7.2",
|
||||
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.2.10",
|
||||
"@backstage/plugin-permission-common": "^0.9.1",
|
||||
"@backstage/plugin-permission-node": "^0.10.2",
|
||||
"@backstage/plugin-proxy-backend": "^0.6.4",
|
||||
"@backstage/plugin-scaffolder-backend": "^2.1.0",
|
||||
"@backstage/plugin-search-backend": "^2.0.4",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.3.6",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.4.4",
|
||||
"@backstage/plugin-search-backend-node": "^1.3.13",
|
||||
"@backstage/plugin-techdocs-backend": "^2.0.4",
|
||||
"app": "link:../app",
|
||||
"better-sqlite3": "^9.0.0",
|
||||
"dockerode": "^3.3.1",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.0"
|
||||
"@backstage/cli": "^0.33.1"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -40,19 +40,19 @@
|
|||
"dependencies": {
|
||||
"@azure/identity": "4.10.2",
|
||||
"@azure/storage-blob": "12.27.0",
|
||||
"@backstage/backend-defaults": "^0.11.0",
|
||||
"@backstage/backend-plugin-api": "^1.4.0",
|
||||
"@backstage/config": "^1.3.2",
|
||||
"@backstage/backend-defaults": "^0.11.1",
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@types/express": "*",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^1.6.0",
|
||||
"@backstage/cli": "^0.33.0",
|
||||
"@backstage/plugin-auth-backend": "^0.25.1",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.9",
|
||||
"@backstage/backend-test-utils": "^1.7.0",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/plugin-auth-backend": "^0.25.2",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.10",
|
||||
"@types/supertest": "^6.0.0",
|
||||
"supertest": "^7.0.0"
|
||||
},
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
"postpack": "backstage-cli package postpack"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.17.3",
|
||||
"@backstage/core-plugin-api": "^1.10.8",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@backstage/theme": "^0.6.6",
|
||||
"@backstage/theme": "^0.6.7",
|
||||
"@material-ui/core": "^4.9.13",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "^4.0.0-alpha.61",
|
||||
|
@ -54,10 +54,10 @@
|
|||
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.0",
|
||||
"@backstage/core-app-api": "^1.17.1",
|
||||
"@backstage/dev-utils": "^1.1.11",
|
||||
"@backstage/test-utils": "^1.7.9",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/core-app-api": "^1.18.0",
|
||||
"@backstage/dev-utils": "^1.1.12",
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,11 @@
|
|||
# @backstage-community/plugin-cost-insights
|
||||
|
||||
## 0.19.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ceeadd1: **ALPHA BREAKING** The New Frontend System `CostInsightsProjectGrowthInstructionsPage` and `CostInsightsLabelDataflowInstructionsPage` have been removed and the new frontend system support refactored to work in the same way as the current implementation.
|
||||
|
||||
## 0.18.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-cost-insights",
|
||||
"version": "0.18.0",
|
||||
"version": "0.19.0",
|
||||
"description": "A Backstage plugin that helps you keep track of your cloud spend",
|
||||
"backstage": {
|
||||
"role": "frontend-plugin",
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
```ts
|
||||
/// <reference types="react" />
|
||||
|
||||
import { AnyApiFactory } from '@backstage/core-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
|
@ -19,78 +18,22 @@ import { RouteRef } from '@backstage/frontend-plugin-api';
|
|||
const _default: FrontendPlugin<
|
||||
{
|
||||
root: RouteRef<undefined>;
|
||||
growthAlerts: RouteRef<undefined>;
|
||||
unlabeledDataflowAlerts: RouteRef<undefined>;
|
||||
},
|
||||
{},
|
||||
{
|
||||
'entity-content:cost-insights/EntityCostInsightsContent': ExtensionDefinition<{
|
||||
kind: 'entity-content';
|
||||
name: 'EntityCostInsightsContent';
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-title',
|
||||
{}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-group',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>;
|
||||
'api:cost-insights': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
name: undefined;
|
||||
config: {};
|
||||
configInput: {};
|
||||
output: ConfigurableExtensionDataRef<
|
||||
AnyApiFactory,
|
||||
'core.api.factory',
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
defaultPath: string;
|
||||
defaultTitle: string;
|
||||
defaultGroup?:
|
||||
| (string & {})
|
||||
| 'overview'
|
||||
| 'documentation'
|
||||
| 'development'
|
||||
| 'deployment'
|
||||
| 'operation'
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
}>;
|
||||
'nav-item:cost-insights': ExtensionDefinition<{
|
||||
|
|
|
@ -14,34 +14,5 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
|
||||
import {
|
||||
projectGrowthAlertRef,
|
||||
rootRouteRef,
|
||||
unlabeledDataflowAlertRef,
|
||||
} from './routes';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
CostInsightsLabelDataflowInstructionsPage,
|
||||
CostInsightsNavItem,
|
||||
CostInsightsPage,
|
||||
CostInsightsProjectGrowthInstructionsPage,
|
||||
EntityCostInsightsContent,
|
||||
} from './alpha/plugin';
|
||||
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'cost-insights',
|
||||
extensions: [
|
||||
CostInsightsPage,
|
||||
CostInsightsProjectGrowthInstructionsPage,
|
||||
CostInsightsLabelDataflowInstructionsPage,
|
||||
EntityCostInsightsContent,
|
||||
CostInsightsNavItem,
|
||||
],
|
||||
routes: convertLegacyRouteRefs({
|
||||
root: rootRouteRef,
|
||||
growthAlerts: projectGrowthAlertRef,
|
||||
unlabeledDataflowAlerts: unlabeledDataflowAlertRef,
|
||||
}),
|
||||
});
|
||||
export * from './alpha/index';
|
||||
export { default } from './alpha/index';
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './plugin';
|
||||
export { default } from './plugin';
|
||||
|
|
|
@ -17,18 +17,31 @@
|
|||
import {
|
||||
PageBlueprint,
|
||||
NavItemBlueprint,
|
||||
createFrontendPlugin,
|
||||
ApiBlueprint,
|
||||
createApiFactory,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
compatWrapper,
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from '@backstage/core-compat-api';
|
||||
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
||||
import MoneyIcon from '@material-ui/icons/MonetizationOn';
|
||||
import {
|
||||
projectGrowthAlertRef,
|
||||
rootRouteRef,
|
||||
unlabeledDataflowAlertRef,
|
||||
} from '../routes';
|
||||
import { rootRouteRef } from '../routes';
|
||||
import { costInsightsApiRef } from '../api';
|
||||
import { ExampleCostInsightsClient } from '../example';
|
||||
|
||||
/** @alpha */
|
||||
export const CostInsightsApi = ApiBlueprint.make({
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
api: costInsightsApiRef,
|
||||
deps: {},
|
||||
factory: ({}) => new ExampleCostInsightsClient(),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
export const CostInsightsPage = PageBlueprint.make({
|
||||
|
@ -36,33 +49,7 @@ export const CostInsightsPage = PageBlueprint.make({
|
|||
defaultPath: '/cost-insights',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
loader: () =>
|
||||
import('../components/CostInsightsPage').then(m =>
|
||||
compatWrapper(<m.CostInsightsPage />),
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
export const CostInsightsProjectGrowthInstructionsPage = PageBlueprint.make({
|
||||
params: {
|
||||
defaultPath: '/cost-insights/investigating-growth',
|
||||
routeRef: convertLegacyRouteRef(projectGrowthAlertRef),
|
||||
loader: () =>
|
||||
import('../components/ProjectGrowthInstructionsPage').then(m =>
|
||||
compatWrapper(<m.ProjectGrowthInstructionsPage />),
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
export const CostInsightsLabelDataflowInstructionsPage = PageBlueprint.make({
|
||||
params: {
|
||||
defaultPath: '/cost-insights/labeling-jobs',
|
||||
routeRef: convertLegacyRouteRef(unlabeledDataflowAlertRef),
|
||||
loader: () =>
|
||||
import('../components/LabelDataflowInstructionsPage').then(m =>
|
||||
compatWrapper(<m.LabelDataflowInstructionsPage />),
|
||||
),
|
||||
import('./router').then(m => compatWrapper(<m.CostInsightsRouter />)),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -72,7 +59,6 @@ export const EntityCostInsightsContent = EntityContentBlueprint.make({
|
|||
params: {
|
||||
defaultPath: '/cost-insights',
|
||||
defaultTitle: 'Cost Insights',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
loader: () =>
|
||||
import('../components/EntityCosts').then(m =>
|
||||
compatWrapper(<m.EntityCosts />),
|
||||
|
@ -90,3 +76,11 @@ export const CostInsightsNavItem = NavItemBlueprint.make({
|
|||
icon: MoneyIcon,
|
||||
},
|
||||
});
|
||||
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'cost-insights',
|
||||
extensions: [CostInsightsApi, CostInsightsPage, CostInsightsNavItem],
|
||||
routes: convertLegacyRouteRefs({
|
||||
root: rootRouteRef,
|
||||
}),
|
||||
});
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2025 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createSubRouteRef } from '@backstage/core-plugin-api';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import { rootRouteRef } from '../routes';
|
||||
import {
|
||||
CostInsightsPage,
|
||||
LabelDataflowInstructionsPage,
|
||||
ProjectGrowthInstructionsPage,
|
||||
} from '../components';
|
||||
|
||||
export const projectGrowthAlertSubRouteRef = createSubRouteRef({
|
||||
id: 'cost-insights/investigating-growth',
|
||||
parent: rootRouteRef,
|
||||
path: '/investigating-growth',
|
||||
});
|
||||
|
||||
export const unlabeledDataflowAlertSubRouteRef = createSubRouteRef({
|
||||
id: 'cost-insights/labeling-jobs',
|
||||
parent: rootRouteRef,
|
||||
path: '/labeling-jobs',
|
||||
});
|
||||
|
||||
export const CostInsightsRouter = () => (
|
||||
<Routes>
|
||||
<Route path="/" element={<CostInsightsPage />} />
|
||||
<Route
|
||||
path={projectGrowthAlertSubRouteRef.path}
|
||||
element={<ProjectGrowthInstructionsPage />}
|
||||
/>
|
||||
<Route
|
||||
path={unlabeledDataflowAlertSubRouteRef.path}
|
||||
element={<LabelDataflowInstructionsPage />}
|
||||
/>
|
||||
</Routes>
|
||||
);
|
|
@ -9,6 +9,7 @@
|
|||
"files": ["node_modules/@backstage/cli/asset-types/asset-types.d.ts"],
|
||||
"exclude": ["node_modules"],
|
||||
"compilerOptions": {
|
||||
"types": ["node"],
|
||||
"outDir": "dist-types",
|
||||
"rootDir": ".",
|
||||
"lib": ["DOM", "DOM.Iterable", "ScriptHost", "ES2022"],
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@backstage-community/plugin-github-actions': minor
|
||||
---
|
||||
|
||||
Backstage version bump to v1.42.3
|
|
@ -3,3 +3,4 @@ dist-types
|
|||
coverage
|
||||
.vscode
|
||||
.eslintrc.js
|
||||
.yarnrc.yml
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,4 @@
|
|||
plugins:
|
||||
- checksum: 8af7b3f2d7d19cacc7a3712f871efcb6208ba283a1f532260b0cba80c2cb66ed772b207b5ba41b8c5d64dd8d5e0c0e15bbb445bd14afac491712965211ba027c
|
||||
path: .yarn/plugins/@yarnpkg/plugin-backstage.cjs
|
||||
spec: "https://versions.backstage.io/v1/releases/1.42.3/yarn-plugin"
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "1.41.1"
|
||||
"version": "1.42.3"
|
||||
}
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
"directory": "workspaces/github-actions"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/e2e-test-utils": "^0.1.1",
|
||||
"@backstage/repo-tools": "^0.15.0",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/e2e-test-utils": "backstage:^",
|
||||
"@backstage/repo-tools": "backstage:^",
|
||||
"@changesets/cli": "^2.27.1",
|
||||
"knip": "^5.27.4",
|
||||
"node-gyp": "^10.0.0",
|
||||
|
|
|
@ -20,26 +20,26 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-github-actions": "workspace:^",
|
||||
"@backstage/app-defaults": "^1.6.4",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/core-app-api": "^1.18.0",
|
||||
"@backstage/core-compat-api": "^0.4.4",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/frontend-app-api": "^0.11.4",
|
||||
"@backstage/frontend-defaults": "^0.2.4",
|
||||
"@backstage/frontend-plugin-api": "^0.10.4",
|
||||
"@backstage/integration-react": "^1.2.9",
|
||||
"@backstage/plugin-api-docs": "^0.12.9",
|
||||
"@backstage/plugin-catalog": "^1.31.1",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.21",
|
||||
"@backstage/plugin-catalog-import": "^0.13.3",
|
||||
"@backstage/plugin-catalog-react": "^1.19.1",
|
||||
"@backstage/plugin-org": "^0.6.41",
|
||||
"@backstage/plugin-user-settings": "^0.8.24",
|
||||
"@backstage/theme": "^0.6.7",
|
||||
"@backstage/app-defaults": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/core-app-api": "backstage:^",
|
||||
"@backstage/core-compat-api": "backstage:^",
|
||||
"@backstage/core-components": "backstage:^",
|
||||
"@backstage/core-plugin-api": "backstage:^",
|
||||
"@backstage/frontend-app-api": "backstage:^",
|
||||
"@backstage/frontend-defaults": "backstage:^",
|
||||
"@backstage/frontend-plugin-api": "backstage:^",
|
||||
"@backstage/integration-react": "backstage:^",
|
||||
"@backstage/plugin-api-docs": "backstage:^",
|
||||
"@backstage/plugin-catalog": "backstage:^",
|
||||
"@backstage/plugin-catalog-common": "backstage:^",
|
||||
"@backstage/plugin-catalog-graph": "backstage:^",
|
||||
"@backstage/plugin-catalog-import": "backstage:^",
|
||||
"@backstage/plugin-catalog-react": "backstage:^",
|
||||
"@backstage/plugin-org": "backstage:^",
|
||||
"@backstage/plugin-user-settings": "backstage:^",
|
||||
"@backstage/theme": "backstage:^",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"history": "^5.0.0",
|
||||
|
@ -51,7 +51,7 @@
|
|||
"styled-components": "^6.1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@backstage/test-utils": "backstage:^",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
|
|
@ -17,18 +17,11 @@ import { FlatRoutes } from '@backstage/core-app-api';
|
|||
import { convertLegacyApp } from '@backstage/core-compat-api';
|
||||
import { createApp } from '@backstage/frontend-defaults';
|
||||
import {
|
||||
configApiRef,
|
||||
ApiBlueprint,
|
||||
createApiFactory,
|
||||
createFrontendModule,
|
||||
PageBlueprint,
|
||||
SignInPageBlueprint,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
ScmAuth,
|
||||
ScmIntegrationsApi,
|
||||
scmIntegrationsApiRef,
|
||||
} from '@backstage/integration-react';
|
||||
|
||||
import { ApiExplorerPage } from '@backstage/plugin-api-docs';
|
||||
import catalogPlugin from '@backstage/plugin-catalog/alpha';
|
||||
import catalogImportPlugin from '@backstage/plugin-catalog-import/alpha';
|
||||
|
@ -49,7 +42,7 @@ const signInPage = SignInPageBlueprint.make({
|
|||
const homePageExtension = PageBlueprint.make({
|
||||
name: 'home',
|
||||
params: {
|
||||
defaultPath: '/',
|
||||
path: '/',
|
||||
loader: () => Promise.resolve(<Navigate to="catalog" />),
|
||||
},
|
||||
});
|
||||
|
@ -60,24 +53,6 @@ const collectedLegacyPlugins = convertLegacyApp(
|
|||
</FlatRoutes>,
|
||||
);
|
||||
|
||||
const scmAuthApi = ApiBlueprint.make({
|
||||
name: 'scm-auth',
|
||||
params: {
|
||||
factory: ScmAuth.createDefaultApiFactory(),
|
||||
},
|
||||
});
|
||||
|
||||
const scmIntegrationsApi = ApiBlueprint.make({
|
||||
name: 'scm-integrations',
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
api: scmIntegrationsApiRef,
|
||||
deps: { configApi: configApiRef },
|
||||
factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export const app = createApp({
|
||||
features: [
|
||||
catalogPlugin,
|
||||
|
@ -87,13 +62,7 @@ export const app = createApp({
|
|||
...collectedLegacyPlugins,
|
||||
createFrontendModule({
|
||||
pluginId: 'app',
|
||||
extensions: [
|
||||
signInPage,
|
||||
homePageExtension,
|
||||
scmAuthApi,
|
||||
scmIntegrationsApi,
|
||||
navigationExtension,
|
||||
],
|
||||
extensions: [signInPage, homePageExtension, navigationExtension],
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -20,23 +20,23 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-github-actions": "workspace:^",
|
||||
"@backstage/app-defaults": "^1.6.4",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/core-app-api": "^1.18.0",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/integration-react": "^1.2.9",
|
||||
"@backstage/plugin-api-docs": "^0.12.9",
|
||||
"@backstage/plugin-catalog": "^1.31.1",
|
||||
"@backstage/plugin-catalog-common": "^1.1.5",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.21",
|
||||
"@backstage/plugin-catalog-import": "^0.13.3",
|
||||
"@backstage/plugin-catalog-react": "^1.19.1",
|
||||
"@backstage/plugin-org": "^0.6.41",
|
||||
"@backstage/plugin-permission-react": "^0.4.36",
|
||||
"@backstage/plugin-user-settings": "^0.8.24",
|
||||
"@backstage/theme": "^0.6.7",
|
||||
"@backstage/app-defaults": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/core-app-api": "backstage:^",
|
||||
"@backstage/core-components": "backstage:^",
|
||||
"@backstage/core-plugin-api": "backstage:^",
|
||||
"@backstage/integration-react": "backstage:^",
|
||||
"@backstage/plugin-api-docs": "backstage:^",
|
||||
"@backstage/plugin-catalog": "backstage:^",
|
||||
"@backstage/plugin-catalog-common": "backstage:^",
|
||||
"@backstage/plugin-catalog-graph": "backstage:^",
|
||||
"@backstage/plugin-catalog-import": "backstage:^",
|
||||
"@backstage/plugin-catalog-react": "backstage:^",
|
||||
"@backstage/plugin-org": "backstage:^",
|
||||
"@backstage/plugin-permission-react": "backstage:^",
|
||||
"@backstage/plugin-user-settings": "backstage:^",
|
||||
"@backstage/theme": "backstage:^",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"history": "^5.0.0",
|
||||
|
@ -47,7 +47,7 @@
|
|||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@backstage/test-utils": "backstage:^",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-defaults": "^0.11.1",
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/plugin-app-backend": "^0.5.4",
|
||||
"@backstage/plugin-auth-backend": "^0.25.2",
|
||||
"@backstage/plugin-auth-backend-module-github-provider": "^0.3.5",
|
||||
"@backstage/plugin-auth-node": "^0.6.5",
|
||||
"@backstage/plugin-catalog-backend": "^3.0.0",
|
||||
"@backstage/plugin-proxy-backend": "^0.6.4",
|
||||
"@backstage/backend-defaults": "backstage:^",
|
||||
"@backstage/backend-plugin-api": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/config": "backstage:^",
|
||||
"@backstage/plugin-app-backend": "backstage:^",
|
||||
"@backstage/plugin-auth-backend": "backstage:^",
|
||||
"@backstage/plugin-auth-backend-module-github-provider": "backstage:^",
|
||||
"@backstage/plugin-auth-node": "backstage:^",
|
||||
"@backstage/plugin-catalog-backend": "backstage:^",
|
||||
"@backstage/plugin-proxy-backend": "backstage:^",
|
||||
"app": "link:../app",
|
||||
"better-sqlite3": "^9.0.0",
|
||||
"dockerode": "^3.3.1",
|
||||
|
@ -39,7 +39,7 @@
|
|||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@types/dockerode": "^3.3.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5",
|
||||
|
|
|
@ -55,14 +55,14 @@
|
|||
"test": "backstage-cli package test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/core-compat-api": "^0.4.4",
|
||||
"@backstage/core-components": "^0.17.4",
|
||||
"@backstage/core-plugin-api": "^1.10.9",
|
||||
"@backstage/frontend-plugin-api": "^0.10.4",
|
||||
"@backstage/integration": "^1.17.1",
|
||||
"@backstage/integration-react": "^1.2.9",
|
||||
"@backstage/plugin-catalog-react": "^1.19.1",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/core-compat-api": "backstage:^",
|
||||
"@backstage/core-components": "backstage:^",
|
||||
"@backstage/core-plugin-api": "backstage:^",
|
||||
"@backstage/frontend-plugin-api": "backstage:^",
|
||||
"@backstage/integration": "backstage:^",
|
||||
"@backstage/integration-react": "backstage:^",
|
||||
"@backstage/plugin-catalog-react": "backstage:^",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.61",
|
||||
|
@ -73,11 +73,11 @@
|
|||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/core-app-api": "^1.18.0",
|
||||
"@backstage/dev-utils": "^1.1.12",
|
||||
"@backstage/frontend-test-utils": "^0.3.4",
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/core-app-api": "backstage:^",
|
||||
"@backstage/dev-utils": "backstage:^",
|
||||
"@backstage/frontend-test-utils": "backstage:^",
|
||||
"@backstage/test-utils": "backstage:^",
|
||||
"@testing-library/dom": "^10.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
"@testing-library/react": "^15.0.0",
|
||||
|
|
|
@ -6,43 +6,44 @@
|
|||
/// <reference types="react" />
|
||||
|
||||
import { AnyApiFactory } from '@backstage/core-plugin-api';
|
||||
import { AnyExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/core-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: FrontendPlugin<
|
||||
const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
entityContent: RouteRef<undefined>;
|
||||
},
|
||||
{},
|
||||
{
|
||||
[x: `api:${string}`]: ExtensionDefinition<{
|
||||
'api:github-actions': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
name: undefined;
|
||||
config: {};
|
||||
configInput: {};
|
||||
output: ConfigurableExtensionDataRef<
|
||||
AnyApiFactory,
|
||||
'core.api.factory',
|
||||
{}
|
||||
>;
|
||||
output: ExtensionDataRef<AnyApiFactory, 'core.api.factory', {}>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends {
|
||||
[x: string]: unknown;
|
||||
},
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
[
|
||||
x: `entity-card:${string}/latest-branch-workflow-runs`
|
||||
]: ExtensionDefinition<{
|
||||
'entity-card:github-actions/latest-branch-workflow-runs': ExtensionDefinition<{
|
||||
config: {
|
||||
props: {
|
||||
branch?: string | undefined;
|
||||
|
@ -62,22 +63,22 @@ const _default: FrontendPlugin<
|
|||
type?: 'content' | 'summary' | 'info' | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
EntityCardType,
|
||||
'catalog.entity-card-type',
|
||||
{
|
||||
|
@ -86,7 +87,13 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {
|
||||
[x: string]: ExtensionInput<
|
||||
AnyExtensionDataRef,
|
||||
ExtensionDataRef<
|
||||
unknown,
|
||||
string,
|
||||
{
|
||||
optional?: true | undefined;
|
||||
}
|
||||
>,
|
||||
{
|
||||
optional: boolean;
|
||||
singleton: boolean;
|
||||
|
@ -101,7 +108,7 @@ const _default: FrontendPlugin<
|
|||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
[x: `entity-card:${string}/latest-workflow-run`]: ExtensionDefinition<{
|
||||
'entity-card:github-actions/latest-workflow-run': ExtensionDefinition<{
|
||||
config: {
|
||||
props: {
|
||||
branch?: string | undefined;
|
||||
|
@ -121,22 +128,22 @@ const _default: FrontendPlugin<
|
|||
type?: 'content' | 'summary' | 'info' | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
EntityCardType,
|
||||
'catalog.entity-card-type',
|
||||
{
|
||||
|
@ -145,7 +152,13 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {
|
||||
[x: string]: ExtensionInput<
|
||||
AnyExtensionDataRef,
|
||||
ExtensionDataRef<
|
||||
unknown,
|
||||
string,
|
||||
{
|
||||
optional?: true | undefined;
|
||||
}
|
||||
>,
|
||||
{
|
||||
optional: boolean;
|
||||
singleton: boolean;
|
||||
|
@ -160,7 +173,7 @@ const _default: FrontendPlugin<
|
|||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
[x: `entity-card:${string}/recent-workflow-runs`]: ExtensionDefinition<{
|
||||
'entity-card:github-actions/recent-workflow-runs': ExtensionDefinition<{
|
||||
config: {
|
||||
props: {
|
||||
dense: boolean;
|
||||
|
@ -184,22 +197,22 @@ const _default: FrontendPlugin<
|
|||
type?: 'content' | 'summary' | 'info' | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
EntityCardType,
|
||||
'catalog.entity-card-type',
|
||||
{
|
||||
|
@ -208,7 +221,13 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {
|
||||
[x: string]: ExtensionInput<
|
||||
AnyExtensionDataRef,
|
||||
ExtensionDataRef<
|
||||
unknown,
|
||||
string,
|
||||
{
|
||||
optional?: true | undefined;
|
||||
}
|
||||
>,
|
||||
{
|
||||
optional: boolean;
|
||||
singleton: boolean;
|
||||
|
@ -223,7 +242,7 @@ const _default: FrontendPlugin<
|
|||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
[x: `entity-card:${string}/workflow-runs`]: ExtensionDefinition<{
|
||||
'entity-card:github-actions/workflow-runs': ExtensionDefinition<{
|
||||
kind: 'entity-card';
|
||||
name: 'workflow-runs';
|
||||
config: {
|
||||
|
@ -235,22 +254,22 @@ const _default: FrontendPlugin<
|
|||
type?: 'content' | 'summary' | 'info' | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
EntityCardType,
|
||||
'catalog.entity-card-type',
|
||||
{
|
||||
|
@ -264,7 +283,7 @@ const _default: FrontendPlugin<
|
|||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
[x: `entity-content:${string}/entity`]: ExtensionDefinition<{
|
||||
'entity-content:github-actions/entity': ExtensionDefinition<{
|
||||
kind: 'entity-content';
|
||||
name: 'entity';
|
||||
config: {
|
||||
|
@ -280,35 +299,31 @@ const _default: FrontendPlugin<
|
|||
group?: string | false | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-title',
|
||||
{}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
(entity: Entity) => boolean,
|
||||
'catalog.entity-filter-function',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-filter-expression',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ConfigurableExtensionDataRef<
|
||||
| ExtensionDataRef<string, 'catalog.entity-content-title', {}>
|
||||
| ExtensionDataRef<
|
||||
string,
|
||||
'catalog.entity-content-group',
|
||||
{
|
||||
|
@ -317,10 +332,12 @@ const _default: FrontendPlugin<
|
|||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
defaultPath: string;
|
||||
defaultTitle: string;
|
||||
defaultGroup?:
|
||||
defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
|
||||
path: string;
|
||||
defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
|
||||
title: string;
|
||||
defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
|
||||
group?:
|
||||
| (string & {})
|
||||
| 'development'
|
||||
| 'deployment'
|
||||
|
@ -329,6 +346,7 @@ const _default: FrontendPlugin<
|
|||
| 'operation'
|
||||
| 'observability'
|
||||
| undefined;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ import { rootRouteRef } from './routes';
|
|||
* @alpha
|
||||
*/
|
||||
export default createFrontendPlugin({
|
||||
id: 'github-actions',
|
||||
pluginId: 'github-actions',
|
||||
routes: convertLegacyRouteRefs({
|
||||
entityContent: rootRouteRef,
|
||||
}),
|
||||
|
|
|
@ -13,11 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {
|
||||
configApiRef,
|
||||
ApiBlueprint,
|
||||
createApiFactory,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { configApiRef, ApiBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { scmAuthApiRef } from '@backstage/integration-react';
|
||||
import { githubActionsApiRef, GithubActionsClient } from '../api';
|
||||
|
||||
|
@ -25,12 +21,11 @@ import { githubActionsApiRef, GithubActionsClient } from '../api';
|
|||
* @alpha
|
||||
*/
|
||||
export const githubActionsApi = ApiBlueprint.make({
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
params: defineParams =>
|
||||
defineParams({
|
||||
api: githubActionsApiRef,
|
||||
deps: { configApi: configApiRef, scmAuthApi: scmAuthApiRef },
|
||||
factory: ({ configApi, scmAuthApi }) =>
|
||||
new GithubActionsClient({ configApi, scmAuthApi }),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
|
|
@ -24,8 +24,8 @@ import { rootRouteRef } from '../routes';
|
|||
export const entityGithubActionsContent = EntityContentBlueprint.make({
|
||||
name: 'entity',
|
||||
params: {
|
||||
defaultPath: 'github-actions',
|
||||
defaultTitle: 'GitHub Actions',
|
||||
path: 'github-actions',
|
||||
title: 'GitHub Actions',
|
||||
filter: isGithubActionsAvailable,
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
loader: () =>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@backstage-community/plugin-github-pull-requests-board': patch
|
||||
---
|
||||
|
||||
Decouple entities from the board logic for reuse the board on other places
|
|
@ -0,0 +1,6 @@
|
|||
app:
|
||||
title: Example App
|
||||
baseUrl: http://localhost:3000
|
||||
|
||||
backend:
|
||||
baseUrl: http://localhost:7007
|
|
@ -6,6 +6,7 @@
|
|||
"node": "18 || 20 || 22"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "backstage-cli repo start",
|
||||
"tsc": "tsc",
|
||||
"tsc:full": "tsc --skipLibCheck false --incremental false",
|
||||
"build:all": "backstage-cli repo build --all",
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
/*
|
||||
* Copyright 2025 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { catalogApiRef, EntityProvider } from '@backstage/plugin-catalog-react';
|
||||
import { Content, Header, HeaderLabel, Page } from '@backstage/core-components';
|
||||
import { TestApiProvider } from '@backstage/test-utils';
|
||||
import { catalogApiMock } from '@backstage/plugin-catalog-react/testUtils';
|
||||
|
||||
import Wifi from '@material-ui/icons/WifiSharp';
|
||||
import OfflineIcon from '@material-ui/icons/WifiOff';
|
||||
|
||||
import { EntityTeamPullRequestsContent } from '../src';
|
||||
import { githubAuthApiRef } from '@backstage/frontend-plugin-api';
|
||||
import React from 'react';
|
||||
|
||||
const GITHUB_PULL_REQUESTS_ANNOTATION = 'github.com/project-slug';
|
||||
const GITHUB_USER_LOGIN_ANNOTATION = 'github.com/user-login';
|
||||
|
||||
const teamEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: {
|
||||
name: 'engineering',
|
||||
},
|
||||
spec: {
|
||||
type: 'team',
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'hasMember',
|
||||
targetRef: 'user:default/user1',
|
||||
},
|
||||
{
|
||||
type: 'hasMember',
|
||||
targetRef: 'user:default/user2',
|
||||
},
|
||||
],
|
||||
};
|
||||
const teamMembers: Entity[] = [
|
||||
{
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: {
|
||||
name: 'user1',
|
||||
annotations: {
|
||||
[GITHUB_USER_LOGIN_ANNOTATION]: 'Sarabadu',
|
||||
},
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/engineering',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: {
|
||||
name: 'user2',
|
||||
annotations: {
|
||||
[GITHUB_USER_LOGIN_ANNOTATION]: 'awanlin',
|
||||
},
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/engineering',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const components: Entity[] = [
|
||||
{
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'repo1',
|
||||
annotations: {
|
||||
[GITHUB_PULL_REQUESTS_ANNOTATION]: 'backstage/community-plugins',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'service',
|
||||
lifecycle: 'production',
|
||||
owner: 'group:engineering',
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/engineering',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'repo2',
|
||||
annotations: {
|
||||
[GITHUB_PULL_REQUESTS_ANNOTATION]: 'backstage/backstage',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'service',
|
||||
lifecycle: 'production',
|
||||
owner: 'group:engineering',
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/engineering',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
const catalogApiMockImp = catalogApiMock({
|
||||
entities: [teamEntity, ...teamMembers, ...components],
|
||||
});
|
||||
|
||||
const githubMockApi = {
|
||||
getAccessToken: async () => {
|
||||
// This is only here to make been able to locally test this plugin without having to
|
||||
// setup a backend app
|
||||
return 'mocked-token';
|
||||
},
|
||||
} as typeof githubAuthApiRef.T;
|
||||
|
||||
createDevApp()
|
||||
// .registerPlugin(githubPullRequestsBoardPlugin)
|
||||
.addPage({
|
||||
element: (
|
||||
<TestApiProvider
|
||||
apis={[
|
||||
[catalogApiRef, catalogApiMockImp],
|
||||
[githubAuthApiRef, githubMockApi],
|
||||
]}
|
||||
>
|
||||
<EntityProvider entity={teamEntity}>
|
||||
<Page themeId="service">
|
||||
<Header title="Mocked Pull Requests Board">
|
||||
<HeaderLabel label="Mode" value="Development" />
|
||||
</Header>
|
||||
<Content>
|
||||
<EntityTeamPullRequestsContent />
|
||||
</Content>
|
||||
</Page>
|
||||
</EntityProvider>
|
||||
</TestApiProvider>
|
||||
),
|
||||
title: 'Entity Todo Content',
|
||||
icon: OfflineIcon,
|
||||
})
|
||||
.addPage({
|
||||
element: (
|
||||
<TestApiProvider
|
||||
apis={[
|
||||
[catalogApiRef, catalogApiMockImp],
|
||||
[githubAuthApiRef, githubMockApi],
|
||||
]}
|
||||
>
|
||||
<EntityProvider entity={teamEntity}>
|
||||
<Page themeId="service">
|
||||
<Header title="Mocked Pull Requests Board">
|
||||
<HeaderLabel label="Mode" value="Development" />
|
||||
</Header>
|
||||
<Content>
|
||||
<EntityTeamPullRequestsContent />
|
||||
</Content>
|
||||
</Page>
|
||||
</EntityProvider>
|
||||
</TestApiProvider>
|
||||
),
|
||||
title: 'Live Pull Requests Board',
|
||||
icon: Wifi,
|
||||
})
|
||||
|
||||
.render();
|
|
@ -72,6 +72,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/dev-utils": "^1.1.12",
|
||||
"@backstage/frontend-test-utils": "^0.3.4",
|
||||
"@backstage/test-utils": "^1.7.10",
|
||||
"@testing-library/dom": "^10.0.0",
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
```ts
|
||||
/// <reference types="react" />
|
||||
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
|
||||
// @public (undocumented)
|
||||
export const EntityTeamPullRequestsCard: (
|
||||
|
@ -29,5 +31,17 @@ export interface EntityTeamPullRequestsContentProps {
|
|||
pullRequestLimit?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export const PullRequestsBoard: (
|
||||
props: PullRequestsBoardProps,
|
||||
) => React_2.JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface PullRequestsBoardProps {
|
||||
entities: Entity[];
|
||||
// (undocumented)
|
||||
pullRequestLimit?: number;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
|
|
@ -32,6 +32,21 @@ jest.mock('../../hooks/useUserRepositoriesAndTeam', () => {
|
|||
};
|
||||
});
|
||||
|
||||
jest.mock('@backstage/plugin-catalog-react', () => {
|
||||
return {
|
||||
useEntity: () => {
|
||||
return {
|
||||
entity: {
|
||||
metadata: {
|
||||
name: 'test-entity',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('../../hooks/usePullRequestsByTeam', () => {
|
||||
const buildPullRequest = ({
|
||||
prTitle,
|
||||
|
|
|
@ -30,6 +30,7 @@ import { shouldDisplayCard } from '../../utils/functions';
|
|||
import { DraftPrIcon } from '../icons/DraftPr';
|
||||
import { useUserRepositoriesAndTeam } from '../../hooks/useUserRepositoriesAndTeam';
|
||||
import UnarchiveIcon from '@material-ui/icons/Unarchive';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
|
||||
/** @public */
|
||||
export interface EntityTeamPullRequestsCardProps {
|
||||
|
@ -39,12 +40,13 @@ export interface EntityTeamPullRequestsCardProps {
|
|||
const EntityTeamPullRequestsCard = (props: EntityTeamPullRequestsCardProps) => {
|
||||
const { pullRequestLimit } = props;
|
||||
const [infoCardFormat, setInfoCardFormat] = useState<PRCardFormating[]>([]);
|
||||
const { entity: teamEntity } = useEntity();
|
||||
const {
|
||||
loading: loadingReposAndTeam,
|
||||
repositories,
|
||||
teamMembers,
|
||||
teamMembersOrganization,
|
||||
} = useUserRepositoriesAndTeam();
|
||||
} = useUserRepositoriesAndTeam(teamEntity);
|
||||
const {
|
||||
loading: loadingPRs,
|
||||
pullRequests,
|
||||
|
|
|
@ -32,6 +32,21 @@ jest.mock('../../hooks/useUserRepositoriesAndTeam', () => {
|
|||
};
|
||||
});
|
||||
|
||||
jest.mock('@backstage/plugin-catalog-react', () => {
|
||||
return {
|
||||
useEntity: () => {
|
||||
return {
|
||||
entity: {
|
||||
metadata: {
|
||||
name: 'test-entity',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('../../hooks/usePullRequestsByTeam', () => {
|
||||
const buildPullRequest = ({
|
||||
prTitle,
|
||||
|
|
|
@ -13,21 +13,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import { Grid, Typography } from '@material-ui/core';
|
||||
import PeopleIcon from '@material-ui/icons/People';
|
||||
import { Progress, InfoCard } from '@backstage/core-components';
|
||||
|
||||
import { InfoCardHeader } from '../InfoCardHeader';
|
||||
import { PullRequestBoardOptions } from '../PullRequestBoardOptions';
|
||||
import { Wrapper } from '../Wrapper';
|
||||
import { PullRequestCard } from '../PullRequestCard';
|
||||
import { usePullRequestsByTeam } from '../../hooks/usePullRequestsByTeam';
|
||||
import { PRCardFormating } from '../../utils/types';
|
||||
import { shouldDisplayCard } from '../../utils/functions';
|
||||
import { DraftPrIcon } from '../icons/DraftPr';
|
||||
import { useUserRepositoriesAndTeam } from '../../hooks/useUserRepositoriesAndTeam';
|
||||
import UnarchiveIcon from '@material-ui/icons/Unarchive';
|
||||
import React from 'react';
|
||||
import PullRequestsBoard from '../PullRequestsBoard';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
|
||||
/** @public */
|
||||
export interface EntityTeamPullRequestsContentProps {
|
||||
|
@ -38,114 +27,14 @@ const EntityTeamPullRequestsContent = (
|
|||
props: EntityTeamPullRequestsContentProps,
|
||||
) => {
|
||||
const { pullRequestLimit } = props;
|
||||
const [infoCardFormat, setInfoCardFormat] = useState<PRCardFormating[]>([]);
|
||||
const {
|
||||
loading: loadingReposAndTeam,
|
||||
repositories,
|
||||
teamMembers,
|
||||
teamMembersOrganization,
|
||||
} = useUserRepositoriesAndTeam();
|
||||
const {
|
||||
loading: loadingPRs,
|
||||
pullRequests,
|
||||
refreshPullRequests,
|
||||
} = usePullRequestsByTeam(
|
||||
repositories,
|
||||
teamMembers,
|
||||
teamMembersOrganization,
|
||||
pullRequestLimit,
|
||||
const { entity: teamEntity } = useEntity();
|
||||
|
||||
return (
|
||||
<PullRequestsBoard
|
||||
entities={[teamEntity]}
|
||||
pullRequestLimit={pullRequestLimit}
|
||||
/>
|
||||
);
|
||||
|
||||
const header = (
|
||||
<InfoCardHeader onRefresh={refreshPullRequests}>
|
||||
<PullRequestBoardOptions
|
||||
onClickOption={newFormats => setInfoCardFormat(newFormats)}
|
||||
value={infoCardFormat}
|
||||
options={[
|
||||
{
|
||||
icon: <PeopleIcon />,
|
||||
value: 'team',
|
||||
ariaLabel: 'Show PRs from your team',
|
||||
},
|
||||
{
|
||||
icon: <DraftPrIcon />,
|
||||
value: 'draft',
|
||||
ariaLabel: 'Show draft PRs',
|
||||
},
|
||||
{
|
||||
icon: <UnarchiveIcon />,
|
||||
value: 'archivedRepo',
|
||||
ariaLabel: 'Show archived repos',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</InfoCardHeader>
|
||||
);
|
||||
|
||||
const getContent = () => {
|
||||
if (loadingReposAndTeam || loadingPRs) {
|
||||
return <Progress />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Grid container spacing={2}>
|
||||
{pullRequests.length ? (
|
||||
pullRequests.map(({ title: columnTitle, content }) => (
|
||||
<Wrapper key={columnTitle} fullscreen>
|
||||
<Typography variant="overline">{columnTitle}</Typography>
|
||||
{content.map(
|
||||
(
|
||||
{
|
||||
id,
|
||||
title,
|
||||
createdAt,
|
||||
lastEditedAt,
|
||||
author,
|
||||
url,
|
||||
latestReviews,
|
||||
commits,
|
||||
repository,
|
||||
isDraft,
|
||||
labels,
|
||||
},
|
||||
index,
|
||||
) =>
|
||||
shouldDisplayCard(
|
||||
repository,
|
||||
author,
|
||||
repositories,
|
||||
teamMembers,
|
||||
infoCardFormat,
|
||||
isDraft,
|
||||
) && (
|
||||
<PullRequestCard
|
||||
key={`pull-request-${id}-${index}`}
|
||||
title={title}
|
||||
createdAt={createdAt}
|
||||
updatedAt={lastEditedAt}
|
||||
author={author}
|
||||
url={url}
|
||||
reviews={latestReviews.nodes}
|
||||
status={commits.nodes}
|
||||
repositoryName={repository.name}
|
||||
repositoryIsArchived={repository.isArchived}
|
||||
isDraft={isDraft}
|
||||
labels={labels.nodes}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
</Wrapper>
|
||||
))
|
||||
) : (
|
||||
<Typography variant="overline" data-testid="no-prs-msg">
|
||||
No pull requests found
|
||||
</Typography>
|
||||
)}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
return <InfoCard title={header}>{getContent()}</InfoCard>;
|
||||
};
|
||||
|
||||
export default EntityTeamPullRequestsContent;
|
||||
|
|
|
@ -0,0 +1,346 @@
|
|||
/*
|
||||
* Copyright 2025 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import PullRequestsBoard from './PullRequestsBoard';
|
||||
import { PullRequestsColumn, Status } from '../../utils/types';
|
||||
import { render } from '@testing-library/react';
|
||||
import { fireEvent } from '@testing-library/react';
|
||||
|
||||
const mockEntities = [
|
||||
{
|
||||
apiVersion: 'v1',
|
||||
kind: 'Group',
|
||||
metadata: {
|
||||
name: 'test-team',
|
||||
namespace: 'default',
|
||||
},
|
||||
spec: {
|
||||
type: 'team',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
jest.mock('../../hooks/useUserRepositoriesAndTeam', () => {
|
||||
return {
|
||||
useUserRepositoriesAndTeam: () => {
|
||||
return {
|
||||
loading: false,
|
||||
repositories: ['team-login/team-repo'],
|
||||
teamMembers: ['team-member'],
|
||||
teamMembersOrganization: 'test-org',
|
||||
};
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('../../hooks/usePullRequestsByTeam', () => {
|
||||
const buildPullRequest = ({
|
||||
prTitle,
|
||||
authorLogin,
|
||||
repoName,
|
||||
isDraft,
|
||||
isArchived,
|
||||
status,
|
||||
}: {
|
||||
prTitle: string;
|
||||
authorLogin: string;
|
||||
repoName: string;
|
||||
isDraft: boolean;
|
||||
isArchived: boolean;
|
||||
status: Status;
|
||||
}) => {
|
||||
return {
|
||||
id: 'id',
|
||||
title: prTitle,
|
||||
url: 'url',
|
||||
lastEditedAt: 'last-edited-at',
|
||||
latestReviews: {
|
||||
nodes: [],
|
||||
},
|
||||
mergeable: true,
|
||||
state: 'state',
|
||||
reviewDecision: null,
|
||||
createdAt: 'created-at',
|
||||
repository: {
|
||||
name: repoName,
|
||||
owner: {
|
||||
login: 'team-login',
|
||||
},
|
||||
isArchived: isArchived,
|
||||
},
|
||||
labels: {
|
||||
nodes: [],
|
||||
},
|
||||
commits: {
|
||||
nodes: [status],
|
||||
},
|
||||
isDraft: isDraft,
|
||||
author: {
|
||||
login: authorLogin,
|
||||
avatarUrl: 'avatar-url',
|
||||
id: 'id',
|
||||
email: 'email',
|
||||
name: 'name',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const pullRequests: PullRequestsColumn[] = [
|
||||
{
|
||||
title: 'column',
|
||||
content: [
|
||||
buildPullRequest({
|
||||
prTitle: 'non-team-non-draft-non-archive',
|
||||
authorLogin: 'non-team-member',
|
||||
repoName: 'team-repo',
|
||||
isDraft: false,
|
||||
isArchived: false,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: null,
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'non-team-non-draft-is-archive',
|
||||
authorLogin: 'non-team-member',
|
||||
repoName: 'team-repo',
|
||||
isDraft: false,
|
||||
isArchived: true,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'FAILURE',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'non-team-is-draft-non-archive',
|
||||
authorLogin: 'non-team-member',
|
||||
repoName: 'team-repo',
|
||||
isDraft: true,
|
||||
isArchived: false,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'FAILURE',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'non-team-is-draft-is-archive',
|
||||
authorLogin: 'non-team-member',
|
||||
repoName: 'team-repo',
|
||||
isDraft: true,
|
||||
isArchived: true,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'SUCCESS',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'is-team-non-draft-non-archive',
|
||||
authorLogin: 'team-member',
|
||||
repoName: 'non-team-repo',
|
||||
isDraft: false,
|
||||
isArchived: false,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'FAILURE',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'is-team-non-draft-is-archive',
|
||||
authorLogin: 'team-member',
|
||||
repoName: 'non-team-repo',
|
||||
isDraft: false,
|
||||
isArchived: true,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'FAILURE',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'is-team-is-draft-non-archive',
|
||||
authorLogin: 'team-member',
|
||||
repoName: 'non-team-repo',
|
||||
isDraft: true,
|
||||
isArchived: false,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'FAILURE',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
buildPullRequest({
|
||||
prTitle: 'is-team-is-draft-is-archive',
|
||||
authorLogin: 'team-member',
|
||||
repoName: 'non-team-repo',
|
||||
isDraft: true,
|
||||
isArchived: true,
|
||||
status: {
|
||||
commit: {
|
||||
statusCheckRollup: {
|
||||
state: 'SUCCESS',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return {
|
||||
usePullRequestsByTeam: () => {
|
||||
return {
|
||||
loading: false,
|
||||
pullRequests: pullRequests,
|
||||
refreshPullRequests: () => {},
|
||||
};
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
describe('PullRequestsBoard', () => {
|
||||
describe('non-team PRs', () => {
|
||||
describe('non-draft PRs', () => {
|
||||
it('should show non-team PRs for un-archived repos when archived option is not checked', async () => {
|
||||
const { getByText, getAllByText, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
expect(getByText('non-team-non-draft-non-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(0);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('should show non-team PRs for archived repos when archived option is checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const archiveToggle = getByTitle('Show archived repos');
|
||||
fireEvent.click(archiveToggle);
|
||||
expect(getByText('non-team-non-draft-is-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('draft PRs', () => {
|
||||
it('should show draft non-team PRs for un-archived repos when archived option is not checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const draftToggle = getByTitle('Show draft PRs');
|
||||
fireEvent.click(draftToggle);
|
||||
expect(getByText('non-team-is-draft-non-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(0);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should show draft non-team PRs for archived repos when archived option is checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const draftToggle = getByTitle('Show draft PRs');
|
||||
fireEvent.click(draftToggle);
|
||||
const archiveToggle = getByTitle('Show archived repos');
|
||||
fireEvent.click(archiveToggle);
|
||||
expect(getByText('non-team-is-draft-is-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('team PRs', () => {
|
||||
describe('non-draft PRs', () => {
|
||||
it('should show team PRs for un-archived repos when archived option is not checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const teamToggle = getByTitle('Show PRs from your team');
|
||||
fireEvent.click(teamToggle);
|
||||
expect(getByText('is-team-non-draft-non-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('non-team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(0);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('should show team PRs for archived repos when archived option is checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const teamToggle = getByTitle('Show PRs from your team');
|
||||
fireEvent.click(teamToggle);
|
||||
const archiveToggle = getByTitle('Show archived repos');
|
||||
fireEvent.click(archiveToggle);
|
||||
expect(getByText('is-team-non-draft-is-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('non-team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('draft PRs', () => {
|
||||
it('should show draft team PRs for un-archived repos when archived option is not checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const teamToggle = getByTitle('Show PRs from your team');
|
||||
fireEvent.click(teamToggle);
|
||||
const draftToggle = getByTitle('Show draft PRs');
|
||||
fireEvent.click(draftToggle);
|
||||
expect(getByText('is-team-is-draft-non-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('non-team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(0);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should show draft team PRs for archived repos when archived option is checked', async () => {
|
||||
const { getByText, getAllByText, getByTitle, queryAllByTitle } = render(
|
||||
<PullRequestsBoard entities={mockEntities} />,
|
||||
);
|
||||
const teamToggle = getByTitle('Show PRs from your team');
|
||||
fireEvent.click(teamToggle);
|
||||
const draftToggle = getByTitle('Show draft PRs');
|
||||
fireEvent.click(draftToggle);
|
||||
const archiveToggle = getByTitle('Show archived repos');
|
||||
fireEvent.click(archiveToggle);
|
||||
expect(getByText('is-team-is-draft-is-archive')).toBeInTheDocument();
|
||||
expect(getAllByText('non-team-repo')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Repository is archived')).toHaveLength(1);
|
||||
expect(queryAllByTitle('Draft PR')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import { Grid, Typography } from '@material-ui/core';
|
||||
import PeopleIcon from '@material-ui/icons/People';
|
||||
import { Progress, InfoCard } from '@backstage/core-components';
|
||||
|
||||
import { InfoCardHeader } from '../InfoCardHeader';
|
||||
import { PullRequestBoardOptions } from '../PullRequestBoardOptions';
|
||||
import { Wrapper } from '../Wrapper';
|
||||
import { PullRequestCard } from '../PullRequestCard';
|
||||
import { usePullRequestsByTeam } from '../../hooks/usePullRequestsByTeam';
|
||||
import { PRCardFormating } from '../../utils/types';
|
||||
import { shouldDisplayCard } from '../../utils/functions';
|
||||
import { DraftPrIcon } from '../icons/DraftPr';
|
||||
import UnarchiveIcon from '@material-ui/icons/Unarchive';
|
||||
import { useUserRepositoriesAndTeam } from '../../hooks/useUserRepositoriesAndTeam';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/** @public */
|
||||
export interface PullRequestsBoardProps {
|
||||
/**
|
||||
* List of entities to display pull requests for.
|
||||
* If not provided, the board will use the current user's repositories and team.
|
||||
*/
|
||||
entities: Entity[];
|
||||
|
||||
pullRequestLimit?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A board component that displays pull requests for multiple entities.
|
||||
* It aggregates pull requests from the provided entities and allows filtering by team, draft status, and archived repositories.
|
||||
* @public
|
||||
* */
|
||||
const PullRequestsBoard = (props: PullRequestsBoardProps) => {
|
||||
const { entities, pullRequestLimit } = props;
|
||||
|
||||
const {
|
||||
loading: loadingReposAndTeams,
|
||||
repositories,
|
||||
teamMembers,
|
||||
teamMembersOrganization,
|
||||
} = useUserRepositoriesAndTeam(entities);
|
||||
const [infoCardFormat, setInfoCardFormat] = useState<PRCardFormating[]>([]);
|
||||
|
||||
const {
|
||||
loading: loadingPRs,
|
||||
pullRequests,
|
||||
refreshPullRequests,
|
||||
} = usePullRequestsByTeam(
|
||||
repositories,
|
||||
teamMembers,
|
||||
teamMembersOrganization,
|
||||
pullRequestLimit,
|
||||
);
|
||||
|
||||
const header = (
|
||||
<InfoCardHeader onRefresh={refreshPullRequests}>
|
||||
<PullRequestBoardOptions
|
||||
onClickOption={newFormats => setInfoCardFormat(newFormats)}
|
||||
value={infoCardFormat}
|
||||
options={[
|
||||
{
|
||||
icon: <PeopleIcon />,
|
||||
value: 'team',
|
||||
ariaLabel: 'Show PRs from your team',
|
||||
},
|
||||
{
|
||||
icon: <DraftPrIcon />,
|
||||
value: 'draft',
|
||||
ariaLabel: 'Show draft PRs',
|
||||
},
|
||||
{
|
||||
icon: <UnarchiveIcon />,
|
||||
value: 'archivedRepo',
|
||||
ariaLabel: 'Show archived repos',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</InfoCardHeader>
|
||||
);
|
||||
|
||||
const getContent = () => {
|
||||
if (loadingReposAndTeams || loadingPRs) {
|
||||
return <Progress />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Grid container spacing={2}>
|
||||
{pullRequests.length ? (
|
||||
pullRequests.map(({ title: columnTitle, content }) => (
|
||||
<Wrapper key={columnTitle} fullscreen>
|
||||
<Typography variant="overline">{columnTitle}</Typography>
|
||||
{content.map(
|
||||
(
|
||||
{
|
||||
id,
|
||||
title,
|
||||
createdAt,
|
||||
lastEditedAt,
|
||||
author,
|
||||
url,
|
||||
latestReviews,
|
||||
commits,
|
||||
repository,
|
||||
isDraft,
|
||||
labels,
|
||||
},
|
||||
index,
|
||||
) =>
|
||||
shouldDisplayCard(
|
||||
repository,
|
||||
author,
|
||||
repositories,
|
||||
teamMembers,
|
||||
infoCardFormat,
|
||||
isDraft,
|
||||
) && (
|
||||
<PullRequestCard
|
||||
key={`pull-request-${id}-${index}`}
|
||||
title={title}
|
||||
createdAt={createdAt}
|
||||
updatedAt={lastEditedAt}
|
||||
author={author}
|
||||
url={url}
|
||||
reviews={latestReviews.nodes}
|
||||
status={commits.nodes}
|
||||
repositoryName={repository.name}
|
||||
repositoryIsArchived={repository.isArchived}
|
||||
isDraft={isDraft}
|
||||
labels={labels.nodes}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
</Wrapper>
|
||||
))
|
||||
) : (
|
||||
<Typography variant="overline" data-testid="no-prs-msg">
|
||||
No pull requests found
|
||||
</Typography>
|
||||
)}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
return <InfoCard title={header}>{getContent()}</InfoCard>;
|
||||
};
|
||||
|
||||
export default PullRequestsBoard;
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default } from './PullRequestsBoard';
|
||||
export type { PullRequestsBoardProps } from './PullRequestsBoard';
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* Copyright 2025 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { renderHook, waitFor } from '@testing-library/react';
|
||||
import { TestApiProvider } from '@backstage/test-utils';
|
||||
import { catalogApiRef } from '@backstage/plugin-catalog-react';
|
||||
import { catalogApiMock } from '@backstage/plugin-catalog-react/testUtils';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { useUserRepositoriesAndTeam } from './useUserRepositoriesAndTeam';
|
||||
import React from 'react';
|
||||
|
||||
const mockTeamEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: {
|
||||
name: 'team-one',
|
||||
namespace: 'default',
|
||||
annotations: {
|
||||
'github.com/team-slug': 'test-org/team-one',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'team',
|
||||
},
|
||||
};
|
||||
|
||||
const mockTeamTwoEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: {
|
||||
name: 'team-two',
|
||||
namespace: 'default',
|
||||
annotations: {
|
||||
'github.com/team-slug': 'test-org/team-two',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'team',
|
||||
},
|
||||
};
|
||||
|
||||
const mockComponentEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'repo-one',
|
||||
namespace: 'default',
|
||||
annotations: {
|
||||
'github.com/project-slug': 'test-org/repo-one',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'service',
|
||||
lifecycle: 'production',
|
||||
owner: 'group:default/team-one',
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/team-one',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const mockUserEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: {
|
||||
name: 'user-one',
|
||||
namespace: 'default',
|
||||
annotations: {
|
||||
'github.com/user-login': 'user-one-github',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
profile: {
|
||||
displayName: 'User One',
|
||||
},
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/team-one',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const mockRepoTwoEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'repo-two',
|
||||
namespace: 'default',
|
||||
annotations: {
|
||||
'github.com/project-slug': 'test-org/repo-two',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'service',
|
||||
lifecycle: 'production',
|
||||
owner: 'group:default/team-two',
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/team-two',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const mockUserTwoEntity: Entity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: {
|
||||
name: 'user-two',
|
||||
namespace: 'default',
|
||||
annotations: {
|
||||
'github.com/user-login': 'user-two-github',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
profile: {
|
||||
displayName: 'User Two',
|
||||
},
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/team-two',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const catalogApi = catalogApiMock({
|
||||
entities: [
|
||||
mockTeamEntity,
|
||||
mockTeamTwoEntity,
|
||||
mockComponentEntity,
|
||||
mockRepoTwoEntity,
|
||||
mockUserEntity,
|
||||
mockUserTwoEntity,
|
||||
],
|
||||
});
|
||||
|
||||
describe('useUserRepositoriesAndTeam', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
const wrapper = ({ children }: { children: React.ReactNode }) => (
|
||||
<TestApiProvider apis={[[catalogApiRef, catalogApi]]}>
|
||||
{children}
|
||||
</TestApiProvider>
|
||||
);
|
||||
|
||||
it('should return repositories and team members for a team entity', async () => {
|
||||
const { result } = renderHook(
|
||||
() => useUserRepositoriesAndTeam(mockTeamEntity),
|
||||
{ wrapper },
|
||||
);
|
||||
|
||||
// Initially should be loading
|
||||
expect(result.current.loading).toBe(true);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(result.current.loading).toBe(false);
|
||||
});
|
||||
|
||||
expect(result.current.repositories).toEqual(['test-org/repo-one']);
|
||||
expect(result.current.teamMembers).toEqual(['user-one-github']);
|
||||
expect(result.current.teamMembersOrganization).toBe('test-org');
|
||||
});
|
||||
|
||||
it('should return repositories and team members for multiple team entities', async () => {
|
||||
const { result } = renderHook(
|
||||
() => useUserRepositoriesAndTeam([mockTeamEntity, mockTeamTwoEntity]),
|
||||
{ wrapper },
|
||||
);
|
||||
|
||||
// Initially should be loading
|
||||
expect(result.current.loading).toBe(true);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(result.current.loading).toBe(false);
|
||||
});
|
||||
|
||||
// Should aggregate repositories and team members from both teams
|
||||
expect(result.current.repositories).toEqual([
|
||||
'test-org/repo-one',
|
||||
'test-org/repo-two',
|
||||
]);
|
||||
expect(result.current.teamMembers).toEqual([
|
||||
'user-one-github',
|
||||
'user-two-github',
|
||||
]);
|
||||
expect(result.current.teamMembersOrganization).toBe('test-org');
|
||||
});
|
||||
});
|
|
@ -14,9 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { stringifyEntityRef } from '@backstage/catalog-model';
|
||||
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { catalogApiRef, useEntity } from '@backstage/plugin-catalog-react';
|
||||
import { catalogApiRef } from '@backstage/plugin-catalog-react';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import {
|
||||
getProjectNameFromEntity,
|
||||
|
@ -24,8 +24,11 @@ import {
|
|||
getUserNameFromEntity,
|
||||
} from '../utils/functions';
|
||||
|
||||
export function useUserRepositoriesAndTeam() {
|
||||
const { entity: teamEntity } = useEntity();
|
||||
export function useUserRepositoriesAndTeam(teamEntities: Entity | Entity[]) {
|
||||
const ownerEntities = Array.isArray(teamEntities)
|
||||
? teamEntities
|
||||
: [teamEntities];
|
||||
|
||||
const catalogApi = useApi(catalogApiRef);
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
const [teamData, setTeamData] = useState<{
|
||||
|
@ -36,14 +39,18 @@ export function useUserRepositoriesAndTeam() {
|
|||
teamMembers: [],
|
||||
});
|
||||
|
||||
const entitiesRefs = ownerEntities.map(e => stringifyEntityRef(e));
|
||||
|
||||
const getTeamData = useCallback(async () => {
|
||||
setLoading(true);
|
||||
|
||||
// get team repositories and members
|
||||
const entitiesList = await catalogApi.getEntities({
|
||||
filter: [
|
||||
{ 'relations.ownedBy': stringifyEntityRef(teamEntity) },
|
||||
{ 'relations.memberOf': stringifyEntityRef(teamEntity) },
|
||||
{ 'relations.ownedBy': entitiesRefs },
|
||||
{
|
||||
'relations.memberOf': entitiesRefs,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -66,7 +73,8 @@ export function useUserRepositoriesAndTeam() {
|
|||
teamMembers: [...new Set(teamMembersNames)],
|
||||
});
|
||||
setLoading(false);
|
||||
}, [catalogApi, teamEntity]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [catalogApi, entitiesRefs.join(',')]);
|
||||
|
||||
useEffect(() => {
|
||||
getTeamData();
|
||||
|
@ -76,6 +84,6 @@ export function useUserRepositoriesAndTeam() {
|
|||
loading,
|
||||
repositories: teamData.repositories,
|
||||
teamMembers: teamData.teamMembers,
|
||||
teamMembersOrganization: getGithubOrganizationFromEntity(teamEntity),
|
||||
teamMembersOrganization: getGithubOrganizationFromEntity(ownerEntities[0]),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,5 +17,7 @@ export {
|
|||
EntityTeamPullRequestsCard,
|
||||
EntityTeamPullRequestsContent,
|
||||
} from './plugin';
|
||||
export { default as PullRequestsBoard } from './components/PullRequestsBoard';
|
||||
export type { EntityTeamPullRequestsCardProps } from './components/EntityTeamPullRequestsCard';
|
||||
export type { EntityTeamPullRequestsContentProps } from './components/EntityTeamPullRequestsContent';
|
||||
export type { PullRequestsBoardProps } from './components/PullRequestsBoard';
|
||||
|
|
|
@ -52,3 +52,6 @@ export const EntityTeamPullRequestsContent =
|
|||
mountPoint: rootRouteRef,
|
||||
}),
|
||||
);
|
||||
|
||||
/** @public */
|
||||
export default githubPullRequestsBoardPlugin;
|
||||
|
|
|
@ -1738,6 +1738,7 @@ __metadata:
|
|||
"@backstage/core-compat-api": "npm:^0.4.4"
|
||||
"@backstage/core-components": "npm:^0.17.4"
|
||||
"@backstage/core-plugin-api": "npm:^1.10.9"
|
||||
"@backstage/dev-utils": "npm:^1.1.12"
|
||||
"@backstage/frontend-plugin-api": "npm:^0.10.4"
|
||||
"@backstage/frontend-test-utils": "npm:^0.3.4"
|
||||
"@backstage/integration": "npm:^1.17.1"
|
||||
|
@ -1764,6 +1765,29 @@ __metadata:
|
|||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@backstage/app-defaults@npm:^1.6.4":
|
||||
version: 1.6.4
|
||||
resolution: "@backstage/app-defaults@npm:1.6.4"
|
||||
dependencies:
|
||||
"@backstage/core-app-api": "npm:^1.18.0"
|
||||
"@backstage/core-components": "npm:^0.17.4"
|
||||
"@backstage/core-plugin-api": "npm:^1.10.9"
|
||||
"@backstage/plugin-permission-react": "npm:^0.4.36"
|
||||
"@backstage/theme": "npm:^0.6.7"
|
||||
"@material-ui/core": "npm:^4.12.2"
|
||||
"@material-ui/icons": "npm:^4.9.1"
|
||||
peerDependencies:
|
||||
"@types/react": ^17.0.0 || ^18.0.0
|
||||
react: ^17.0.0 || ^18.0.0
|
||||
react-dom: ^17.0.0 || ^18.0.0
|
||||
react-router-dom: ^6.3.0
|
||||
peerDependenciesMeta:
|
||||
"@types/react":
|
||||
optional: true
|
||||
checksum: 10/fb88e41cde626ac91b277ade2f2b2e881cffc61d76497569b483f84231947c2afce7259d2f79e43fadfb02c40254c4f3426b3890a29b26ab522a9c7e2d0135a1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@backstage/backend-plugin-api@npm:^1.4.1":
|
||||
version: 1.4.1
|
||||
resolution: "@backstage/backend-plugin-api@npm:1.4.1"
|
||||
|
@ -2126,6 +2150,33 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@backstage/dev-utils@npm:^1.1.12":
|
||||
version: 1.1.12
|
||||
resolution: "@backstage/dev-utils@npm:1.1.12"
|
||||
dependencies:
|
||||
"@backstage/app-defaults": "npm:^1.6.4"
|
||||
"@backstage/catalog-model": "npm:^1.7.5"
|
||||
"@backstage/core-app-api": "npm:^1.18.0"
|
||||
"@backstage/core-components": "npm:^0.17.4"
|
||||
"@backstage/core-plugin-api": "npm:^1.10.9"
|
||||
"@backstage/integration-react": "npm:^1.2.9"
|
||||
"@backstage/plugin-catalog-react": "npm:^1.19.1"
|
||||
"@backstage/theme": "npm:^0.6.7"
|
||||
"@material-ui/core": "npm:^4.12.2"
|
||||
"@material-ui/icons": "npm:^4.9.1"
|
||||
react-use: "npm:^17.2.4"
|
||||
peerDependencies:
|
||||
"@types/react": ^17.0.0 || ^18.0.0
|
||||
react: ^17.0.0 || ^18.0.0
|
||||
react-dom: ^17.0.0 || ^18.0.0
|
||||
react-router-dom: ^6.3.0
|
||||
peerDependenciesMeta:
|
||||
"@types/react":
|
||||
optional: true
|
||||
checksum: 10/1a00f6a7b7ccdcbb3fd1c9c144687fd29e04698d4f846b63d4294c8e5136c8ed640f5fb3da88109cbcce9eb73355b07d0a59b15a8486fe55c1e61634fb60fd3f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@backstage/e2e-test-utils@npm:^0.1.1":
|
||||
version: 0.1.1
|
||||
resolution: "@backstage/e2e-test-utils@npm:0.1.1"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,4 @@
|
|||
plugins:
|
||||
- checksum: 8af7b3f2d7d19cacc7a3712f871efcb6208ba283a1f532260b0cba80c2cb66ed772b207b5ba41b8c5d64dd8d5e0c0e15bbb445bd14afac491712965211ba027c
|
||||
path: .yarn/plugins/@yarnpkg/plugin-backstage.cjs
|
||||
spec: 'https://versions.backstage.io/v1/releases/1.42.3/yarn-plugin'
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "1.41.1"
|
||||
"version": "1.42.3"
|
||||
}
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
"directory": "workspaces/linguist"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/e2e-test-utils": "^0.1.1",
|
||||
"@backstage/repo-tools": "^0.15.0",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@backstage/e2e-test-utils": "backstage:^",
|
||||
"@backstage/repo-tools": "backstage:^",
|
||||
"@changesets/cli": "^2.27.1",
|
||||
"knip": "^5.27.4",
|
||||
"node-gyp": "^10.0.0",
|
||||
|
@ -62,9 +62,5 @@
|
|||
"*.{json,md}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-linguist": "workspace:^",
|
||||
"@backstage-community/plugin-linguist-backend": "workspace:^"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
# @backstage-community/plugin-catalog-backend-module-linguist-tags-processor
|
||||
|
||||
## 0.12.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ca3c813: Backstage version bump to v1.42.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ca3c813]
|
||||
- @backstage-community/plugin-linguist-common@0.11.0
|
||||
|
||||
## 0.11.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@backstage-community/plugin-catalog-backend-module-linguist-tags-processor",
|
||||
"description": "The linguist-tags-processor backend module for the catalog plugin.",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -31,16 +31,16 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage-community/plugin-linguist-common": "workspace:^",
|
||||
"@backstage/backend-plugin-api": "^1.4.1",
|
||||
"@backstage/catalog-model": "^1.7.5",
|
||||
"@backstage/config": "^1.3.3",
|
||||
"@backstage/plugin-catalog-node": "^1.17.2",
|
||||
"@backstage/types": "^1.2.1",
|
||||
"@backstage/backend-plugin-api": "backstage:^",
|
||||
"@backstage/catalog-model": "backstage:^",
|
||||
"@backstage/config": "backstage:^",
|
||||
"@backstage/plugin-catalog-node": "backstage:^",
|
||||
"@backstage/types": "backstage:^",
|
||||
"node-fetch": "^2.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^1.7.0",
|
||||
"@backstage/cli": "^0.33.1",
|
||||
"@backstage/backend-test-utils": "backstage:^",
|
||||
"@backstage/cli": "backstage:^",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"js-yaml": "^4.1.0",
|
||||
"linguist-js": "^2.5.3"
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
# @backstage-community/plugin-linguist-backend
|
||||
|
||||
## 0.18.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ca3c813: Backstage version bump to v1.42.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ca3c813]
|
||||
- @backstage-community/plugin-linguist-common@0.11.0
|
||||
|
||||
## 0.17.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue