From c101e683d5a554ec555b1cdff059e62ef488220b Mon Sep 17 00:00:00 2001 From: djamaile Date: Wed, 4 Oct 2023 13:49:19 +0200 Subject: [PATCH 1/8] chore: move catalogModuleGithubOrgEntityProvider to its own backend module Signed-off-by: djamaile --- .changeset/strange-dodos-film.md | 5 + .changeset/tame-trainers-visit.md | 5 + .../.eslintrc.js | 1 + .../README.md | 5 + .../api-report.md | 11 +++ .../package.json | 48 ++++++++++ .../src/index.ts | 23 +++++ .../src/module.test.ts} | 4 +- .../src/module.ts} | 4 +- .../alpha-api-report.md | 15 --- .../src/module/index.ts | 5 - yarn.lock | 91 ++++++++++++++++++- 12 files changed, 190 insertions(+), 27 deletions(-) create mode 100644 .changeset/strange-dodos-film.md create mode 100644 .changeset/tame-trainers-visit.md create mode 100644 plugins/catalog-backend-module-github-org/.eslintrc.js create mode 100644 plugins/catalog-backend-module-github-org/README.md create mode 100644 plugins/catalog-backend-module-github-org/api-report.md create mode 100644 plugins/catalog-backend-module-github-org/package.json create mode 100644 plugins/catalog-backend-module-github-org/src/index.ts rename plugins/{catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.test.ts => catalog-backend-module-github-org/src/module.test.ts} (94%) rename plugins/{catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.ts => catalog-backend-module-github-org/src/module.ts} (98%) diff --git a/.changeset/strange-dodos-film.md b/.changeset/strange-dodos-film.md new file mode 100644 index 0000000000..78b9119a2b --- /dev/null +++ b/.changeset/strange-dodos-film.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-github-org': minor +--- + +Added `catalogModuleGithubOrgEntityProvider` to ingest users and teams from multiple Github organizations. diff --git a/.changeset/tame-trainers-visit.md b/.changeset/tame-trainers-visit.md new file mode 100644 index 0000000000..5315f3e1d5 --- /dev/null +++ b/.changeset/tame-trainers-visit.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-github': patch +--- + +Removed `catalogModuleGithubOrgEntityProvider`. Import from `@backstage/plugin-catalog-backend-module-github-org` instead. diff --git a/plugins/catalog-backend-module-github-org/.eslintrc.js b/plugins/catalog-backend-module-github-org/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/plugins/catalog-backend-module-github-org/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/catalog-backend-module-github-org/README.md b/plugins/catalog-backend-module-github-org/README.md new file mode 100644 index 0000000000..6b03dc299d --- /dev/null +++ b/plugins/catalog-backend-module-github-org/README.md @@ -0,0 +1,5 @@ +# @backstage/plugin-catalog-backend-module-github-org + +The github-org backend module for the catalog plugin. + +_This plugin was created through the Backstage CLI_ diff --git a/plugins/catalog-backend-module-github-org/api-report.md b/plugins/catalog-backend-module-github-org/api-report.md new file mode 100644 index 0000000000..aa40dba005 --- /dev/null +++ b/plugins/catalog-backend-module-github-org/api-report.md @@ -0,0 +1,11 @@ +## API Report File for "@backstage/plugin-catalog-backend-module-github-org" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; + +// @public +const catalogModuleGithubOrgEntityProvider: () => BackendFeature; +export default catalogModuleGithubOrgEntityProvider; +``` diff --git a/plugins/catalog-backend-module-github-org/package.json b/plugins/catalog-backend-module-github-org/package.json new file mode 100644 index 0000000000..f6d754ceae --- /dev/null +++ b/plugins/catalog-backend-module-github-org/package.json @@ -0,0 +1,48 @@ +{ + "name": "@backstage/plugin-catalog-backend-module-github-org", + "description": "The github-org backend module for the catalog plugin.", + "version": "0.0.0", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "types": "dist/index.d.ts" + }, + "backstage": { + "role": "backend-plugin-module" + }, + "scripts": { + "start": "backstage-cli package start", + "build": "backstage-cli package build", + "lint": "backstage-cli package lint", + "test": "backstage-cli package test", + "clean": "backstage-cli package clean", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack" + }, + "dependencies": { + "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", + "@backstage/backend-tasks": "workspace:^", + "@backstage/catalog-model": "workspace:^", + "@backstage/config": "workspace:^", + "@backstage/integration": "workspace:^", + "@backstage/plugin-catalog-backend-module-github": "workspace:^", + "@backstage/plugin-catalog-node": "workspace:^", + "@backstage/plugin-events-node": "workspace:^", + "@octokit/graphql": "^7.0.2", + "lodash": "^4.17.21", + "uuid": "^9.0.1", + "winston": "^3.10.0" + }, + "devDependencies": { + "@backstage/backend-test-utils": "workspace:^", + "@backstage/cli": "workspace:^", + "luxon": "^3.0.0" + }, + "files": [ + "dist" + ] +} diff --git a/plugins/catalog-backend-module-github-org/src/index.ts b/plugins/catalog-backend-module-github-org/src/index.ts new file mode 100644 index 0000000000..522add37fa --- /dev/null +++ b/plugins/catalog-backend-module-github-org/src/index.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2023 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. + */ + +/** + * The github-org backend module for the catalog plugin. + * + * @packageDocumentation + */ + +export { catalogModuleGithubOrgEntityProvider as default } from './module'; diff --git a/plugins/catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.test.ts b/plugins/catalog-backend-module-github-org/src/module.test.ts similarity index 94% rename from plugins/catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.test.ts rename to plugins/catalog-backend-module-github-org/src/module.test.ts index 1b8b115a96..19680b9df3 100644 --- a/plugins/catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.test.ts +++ b/plugins/catalog-backend-module-github-org/src/module.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 The Backstage Authors + * Copyright 2023 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. @@ -19,7 +19,7 @@ import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; import { EntityProvider } from '@backstage/plugin-catalog-node'; import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; import { Duration } from 'luxon'; -import { catalogModuleGithubOrgEntityProvider } from './catalogModuleGithubOrgEntityProvider'; +import { catalogModuleGithubOrgEntityProvider } from './module'; describe('catalogModuleGithubOrgEntityProvider', () => { it('should register provider at the catalog extension point', async () => { diff --git a/plugins/catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.ts b/plugins/catalog-backend-module-github-org/src/module.ts similarity index 98% rename from plugins/catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.ts rename to plugins/catalog-backend-module-github-org/src/module.ts index 4838be54e1..642441951a 100644 --- a/plugins/catalog-backend-module-github/src/module/catalogModuleGithubOrgEntityProvider.ts +++ b/plugins/catalog-backend-module-github-org/src/module.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 The Backstage Authors + * Copyright 2023 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. @@ -64,7 +64,7 @@ export const githubOrgEntityProviderTransformsExtensionPoint = /** * Registers the `GithubMultiOrgEntityProvider` with the catalog processing extension point. * - * @alpha + * @public */ export const catalogModuleGithubOrgEntityProvider = createBackendModule({ pluginId: 'catalog', diff --git a/plugins/catalog-backend-module-github/alpha-api-report.md b/plugins/catalog-backend-module-github/alpha-api-report.md index 3bf72c449b..cd5344f728 100644 --- a/plugins/catalog-backend-module-github/alpha-api-report.md +++ b/plugins/catalog-backend-module-github/alpha-api-report.md @@ -4,25 +4,10 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; -import { ExtensionPoint } from '@backstage/backend-plugin-api'; -import { TeamTransformer } from '@backstage/plugin-catalog-backend-module-github'; -import { UserTransformer } from '@backstage/plugin-catalog-backend-module-github'; // @alpha const catalogModuleGithubEntityProvider: () => BackendFeature; export default catalogModuleGithubEntityProvider; -// @alpha -export const catalogModuleGithubOrgEntityProvider: () => BackendFeature; - -// @alpha -export interface GithubOrgEntityProviderTransformsExtensionPoint { - setTeamTransformer(transformer: TeamTransformer): void; - setUserTransformer(transformer: UserTransformer): void; -} - -// @alpha -export const githubOrgEntityProviderTransformsExtensionPoint: ExtensionPoint; - // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-backend-module-github/src/module/index.ts b/plugins/catalog-backend-module-github/src/module/index.ts index 7e8a214ca3..9c9331763c 100644 --- a/plugins/catalog-backend-module-github/src/module/index.ts +++ b/plugins/catalog-backend-module-github/src/module/index.ts @@ -15,8 +15,3 @@ */ export { catalogModuleGithubEntityProvider as default } from './catalogModuleGithubEntityProvider'; -export { - catalogModuleGithubOrgEntityProvider, - githubOrgEntityProviderTransformsExtensionPoint, - type GithubOrgEntityProviderTransformsExtensionPoint, -} from './catalogModuleGithubOrgEntityProvider'; diff --git a/yarn.lock b/yarn.lock index 38af62fcd1..02019f1bde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5497,7 +5497,30 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github": +"@backstage/plugin-catalog-backend-module-github-org@workspace:plugins/catalog-backend-module-github-org": + version: 0.0.0-use.local + resolution: "@backstage/plugin-catalog-backend-module-github-org@workspace:plugins/catalog-backend-module-github-org" + dependencies: + "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-tasks": "workspace:^" + "@backstage/backend-test-utils": "workspace:^" + "@backstage/catalog-model": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/config": "workspace:^" + "@backstage/integration": "workspace:^" + "@backstage/plugin-catalog-backend-module-github": "workspace:^" + "@backstage/plugin-catalog-node": "workspace:^" + "@backstage/plugin-events-node": "workspace:^" + "@octokit/graphql": ^7.0.2 + lodash: ^4.17.21 + luxon: ^3.0.0 + uuid: ^9.0.1 + winston: ^3.10.0 + languageName: unknown + linkType: soft + +"@backstage/plugin-catalog-backend-module-github@workspace:^, @backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github" dependencies: @@ -14024,6 +14047,17 @@ __metadata: languageName: node linkType: hard +"@octokit/endpoint@npm:^9.0.0": + version: 9.0.1 + resolution: "@octokit/endpoint@npm:9.0.1" + dependencies: + "@octokit/types": ^12.0.0 + is-plain-object: ^5.0.0 + universal-user-agent: ^6.0.0 + checksum: 4f700c66829ed0b5ced3c0d018d63de1ecf1a267064095e450b6cfeb6abddecc704947d3f04e4921ac0d4d73595d81d52802d3306945ba7a642f1386fd8db68b + languageName: node + linkType: hard + "@octokit/graphql-schema@npm:^13.7.0": version: 13.10.0 resolution: "@octokit/graphql-schema@npm:13.10.0" @@ -14045,6 +14079,17 @@ __metadata: languageName: node linkType: hard +"@octokit/graphql@npm:^7.0.2": + version: 7.0.2 + resolution: "@octokit/graphql@npm:7.0.2" + dependencies: + "@octokit/request": ^8.0.1 + "@octokit/types": ^12.0.0 + universal-user-agent: ^6.0.0 + checksum: 05a752c4c2d84fc2900d8e32e1c2d1ee98a5a14349e651cb1109d0741e821e7417a048b1bb40918534ed90a472314aabbda35688868016f248098925f82a3bfa + languageName: node + linkType: hard + "@octokit/oauth-app@npm:^4.0.7, @octokit/oauth-app@npm:^4.2.0, @octokit/oauth-app@npm:^4.2.1": version: 4.2.4 resolution: "@octokit/oauth-app@npm:4.2.4" @@ -14123,6 +14168,13 @@ __metadata: languageName: node linkType: hard +"@octokit/openapi-types@npm:^19.0.0": + version: 19.0.0 + resolution: "@octokit/openapi-types@npm:19.0.0" + checksum: 9a8125ab4e1651ca4b2f734cfa15ca52fe9fa0edd87696e4f57dfa2bcd472767f0f8a99b9324be21f863e6cd91afee423982189f97ac018f3c78a83560e616f5 + languageName: node + linkType: hard + "@octokit/plugin-paginate-rest@npm:^6.0.0, @octokit/plugin-paginate-rest@npm:^6.1.0, @octokit/plugin-paginate-rest@npm:^6.1.2": version: 6.1.2 resolution: "@octokit/plugin-paginate-rest@npm:6.1.2" @@ -14202,6 +14254,17 @@ __metadata: languageName: node linkType: hard +"@octokit/request-error@npm:^5.0.0": + version: 5.0.1 + resolution: "@octokit/request-error@npm:5.0.1" + dependencies: + "@octokit/types": ^12.0.0 + deprecation: ^2.0.0 + once: ^1.4.0 + checksum: a681341e43b4da7a8acb19e1a6ba0355b1af146fa0191f2554a98950cf85f898af6ae3ab0b0287d6c871f5465ec57cb38363b96b5019f9f77ba6f30eca39ede5 + languageName: node + linkType: hard + "@octokit/request@npm:^5.4.14, @octokit/request@npm:^5.6.3": version: 5.6.3 resolution: "@octokit/request@npm:5.6.3" @@ -14230,6 +14293,19 @@ __metadata: languageName: node linkType: hard +"@octokit/request@npm:^8.0.1": + version: 8.1.2 + resolution: "@octokit/request@npm:8.1.2" + dependencies: + "@octokit/endpoint": ^9.0.0 + "@octokit/request-error": ^5.0.0 + "@octokit/types": ^12.0.0 + is-plain-object: ^5.0.0 + universal-user-agent: ^6.0.0 + checksum: 77b9221916f557bba633293ee0d1418766ae59fdfd7ccd626bbcbf0748c6d5dec80fead29f62d8eb427b32e4d8fc4de61c3f9d23999563580890b80b52ccc8e6 + languageName: node + linkType: hard + "@octokit/rest@npm:^19.0.3": version: 19.0.13 resolution: "@octokit/rest@npm:19.0.13" @@ -14249,6 +14325,15 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^12.0.0": + version: 12.0.0 + resolution: "@octokit/types@npm:12.0.0" + dependencies: + "@octokit/openapi-types": ^19.0.0 + checksum: ad55e13cbeef96a63d0088df2ed0a8f3ca764db3f877aa2ecb1693de40b03c1f8e392603bd7fddaaaa74138970ea39f46e4b830d15eeeba74be1671f36440129 + languageName: node + linkType: hard + "@octokit/types@npm:^6.0.3, @octokit/types@npm:^6.10.0, @octokit/types@npm:^6.12.2, @octokit/types@npm:^6.16.1, @octokit/types@npm:^6.8.2": version: 6.41.0 resolution: "@octokit/types@npm:6.41.0" @@ -41842,7 +41927,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0": +"uuid@npm:^9.0.0, uuid@npm:^9.0.1": version: 9.0.1 resolution: "uuid@npm:9.0.1" bin: @@ -42602,7 +42687,7 @@ __metadata: languageName: node linkType: hard -"winston@npm:^3.2.1": +"winston@npm:^3.10.0, winston@npm:^3.2.1": version: 3.10.0 resolution: "winston@npm:3.10.0" dependencies: From dfd9457173afb86a56c918b6b3bce6d880eda814 Mon Sep 17 00:00:00 2001 From: djamaile Date: Wed, 4 Oct 2023 18:17:25 +0200 Subject: [PATCH 2/8] chore: add catalog-info.yaml Signed-off-by: djamaile --- .../catalog-info.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 plugins/catalog-backend-module-github-org/catalog-info.yaml diff --git a/plugins/catalog-backend-module-github-org/catalog-info.yaml b/plugins/catalog-backend-module-github-org/catalog-info.yaml new file mode 100644 index 0000000000..a785727e76 --- /dev/null +++ b/plugins/catalog-backend-module-github-org/catalog-info.yaml @@ -0,0 +1,10 @@ +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: backstage-plugin-catalog-backend-module-github-org + title: '@backstage/plugin-catalog-backend-module-github-org' + description: A Backstage catalog backend module that ingests users and teams from multiple Github organizations +spec: + lifecycle: experimental + type: backstage-backend-plugin-module + owner: catalog-maintainers From cdc61c2ac2580ef3617a577bce983a8388b8818d Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 5 Oct 2023 13:54:13 +0200 Subject: [PATCH 3/8] chore: change date of license back Signed-off-by: djamaile --- plugins/catalog-backend-module-github-org/src/module.test.ts | 2 +- plugins/catalog-backend-module-github-org/src/module.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend-module-github-org/src/module.test.ts b/plugins/catalog-backend-module-github-org/src/module.test.ts index 19680b9df3..9f8e9119d9 100644 --- a/plugins/catalog-backend-module-github-org/src/module.test.ts +++ b/plugins/catalog-backend-module-github-org/src/module.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2023 The Backstage Authors + * 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. diff --git a/plugins/catalog-backend-module-github-org/src/module.ts b/plugins/catalog-backend-module-github-org/src/module.ts index 642441951a..7e6679b55e 100644 --- a/plugins/catalog-backend-module-github-org/src/module.ts +++ b/plugins/catalog-backend-module-github-org/src/module.ts @@ -1,5 +1,5 @@ /* - * Copyright 2023 The Backstage Authors + * 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. From 2b3c56a5d58c1df493444d9a69ac9015811e3384 Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 5 Oct 2023 13:58:13 +0200 Subject: [PATCH 4/8] chore: remove unused dependencies Signed-off-by: djamaile --- plugins/catalog-backend-module-github-org/package.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/catalog-backend-module-github-org/package.json b/plugins/catalog-backend-module-github-org/package.json index f6d754ceae..9c7023ab31 100644 --- a/plugins/catalog-backend-module-github-org/package.json +++ b/plugins/catalog-backend-module-github-org/package.json @@ -26,16 +26,9 @@ "@backstage/backend-common": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/backend-tasks": "workspace:^", - "@backstage/catalog-model": "workspace:^", "@backstage/config": "workspace:^", - "@backstage/integration": "workspace:^", "@backstage/plugin-catalog-backend-module-github": "workspace:^", - "@backstage/plugin-catalog-node": "workspace:^", - "@backstage/plugin-events-node": "workspace:^", - "@octokit/graphql": "^7.0.2", - "lodash": "^4.17.21", - "uuid": "^9.0.1", - "winston": "^3.10.0" + "@backstage/plugin-catalog-node": "workspace:^" }, "devDependencies": { "@backstage/backend-test-utils": "workspace:^", From 62064396c7d7dc2ea7fc9a2895abc98b72c8a057 Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 5 Oct 2023 14:24:27 +0200 Subject: [PATCH 5/8] chore: add TODO comment Signed-off-by: djamaile --- .../catalog-backend-module-github-org/src/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-github-org/src/index.ts b/plugins/catalog-backend-module-github-org/src/index.ts index 522add37fa..157772516d 100644 --- a/plugins/catalog-backend-module-github-org/src/index.ts +++ b/plugins/catalog-backend-module-github-org/src/index.ts @@ -19,5 +19,14 @@ * * @packageDocumentation */ - export { catalogModuleGithubOrgEntityProvider as default } from './module'; +/** + * + * TODO(djamaile): GithubMultiOrgEntityProvider should be mirgated over to this module. + * Afterwards, mark it as deprecated in catalog-backend-module-github and export them there from this module. + */ +export { + GithubMultiOrgEntityProvider, + type TeamTransformer, + type UserTransformer, +} from '@backstage/plugin-catalog-backend-module-github'; From d9fa36ed41fe5a92f3fa2f96f2a9c03bf8dbf321 Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 5 Oct 2023 14:26:36 +0200 Subject: [PATCH 6/8] chore: run api-reports command Signed-off-by: djamaile --- plugins/catalog-backend-module-github-org/api-report.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/catalog-backend-module-github-org/api-report.md b/plugins/catalog-backend-module-github-org/api-report.md index aa40dba005..f5d6c877cc 100644 --- a/plugins/catalog-backend-module-github-org/api-report.md +++ b/plugins/catalog-backend-module-github-org/api-report.md @@ -4,8 +4,17 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; +import { GithubMultiOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-github'; +import { TeamTransformer } from '@backstage/plugin-catalog-backend-module-github'; +import { UserTransformer } from '@backstage/plugin-catalog-backend-module-github'; // @public const catalogModuleGithubOrgEntityProvider: () => BackendFeature; export default catalogModuleGithubOrgEntityProvider; + +export { GithubMultiOrgEntityProvider }; + +export { TeamTransformer }; + +export { UserTransformer }; ``` From 55d6aa7f03218777119e61bf3b061dbfd691a635 Mon Sep 17 00:00:00 2001 From: djamaile Date: Thu, 5 Oct 2023 15:47:11 +0200 Subject: [PATCH 7/8] chore: run yarn install Signed-off-by: djamaile --- yarn.lock | 73 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/yarn.lock b/yarn.lock index 02019f1bde..8c2512c85f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5505,18 +5505,11 @@ __metadata: "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-tasks": "workspace:^" "@backstage/backend-test-utils": "workspace:^" - "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" - "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend-module-github": "workspace:^" "@backstage/plugin-catalog-node": "workspace:^" - "@backstage/plugin-events-node": "workspace:^" - "@octokit/graphql": ^7.0.2 - lodash: ^4.17.21 luxon: ^3.0.0 - uuid: ^9.0.1 - winston: ^3.10.0 languageName: unknown linkType: soft @@ -14047,17 +14040,6 @@ __metadata: languageName: node linkType: hard -"@octokit/endpoint@npm:^9.0.0": - version: 9.0.1 - resolution: "@octokit/endpoint@npm:9.0.1" - dependencies: - "@octokit/types": ^12.0.0 - is-plain-object: ^5.0.0 - universal-user-agent: ^6.0.0 - checksum: 4f700c66829ed0b5ced3c0d018d63de1ecf1a267064095e450b6cfeb6abddecc704947d3f04e4921ac0d4d73595d81d52802d3306945ba7a642f1386fd8db68b - languageName: node - linkType: hard - "@octokit/graphql-schema@npm:^13.7.0": version: 13.10.0 resolution: "@octokit/graphql-schema@npm:13.10.0" @@ -14079,17 +14061,6 @@ __metadata: languageName: node linkType: hard -"@octokit/graphql@npm:^7.0.2": - version: 7.0.2 - resolution: "@octokit/graphql@npm:7.0.2" - dependencies: - "@octokit/request": ^8.0.1 - "@octokit/types": ^12.0.0 - universal-user-agent: ^6.0.0 - checksum: 05a752c4c2d84fc2900d8e32e1c2d1ee98a5a14349e651cb1109d0741e821e7417a048b1bb40918534ed90a472314aabbda35688868016f248098925f82a3bfa - languageName: node - linkType: hard - "@octokit/oauth-app@npm:^4.0.7, @octokit/oauth-app@npm:^4.2.0, @octokit/oauth-app@npm:^4.2.1": version: 4.2.4 resolution: "@octokit/oauth-app@npm:4.2.4" @@ -14168,13 +14139,6 @@ __metadata: languageName: node linkType: hard -"@octokit/openapi-types@npm:^19.0.0": - version: 19.0.0 - resolution: "@octokit/openapi-types@npm:19.0.0" - checksum: 9a8125ab4e1651ca4b2f734cfa15ca52fe9fa0edd87696e4f57dfa2bcd472767f0f8a99b9324be21f863e6cd91afee423982189f97ac018f3c78a83560e616f5 - languageName: node - linkType: hard - "@octokit/plugin-paginate-rest@npm:^6.0.0, @octokit/plugin-paginate-rest@npm:^6.1.0, @octokit/plugin-paginate-rest@npm:^6.1.2": version: 6.1.2 resolution: "@octokit/plugin-paginate-rest@npm:6.1.2" @@ -14254,17 +14218,6 @@ __metadata: languageName: node linkType: hard -"@octokit/request-error@npm:^5.0.0": - version: 5.0.1 - resolution: "@octokit/request-error@npm:5.0.1" - dependencies: - "@octokit/types": ^12.0.0 - deprecation: ^2.0.0 - once: ^1.4.0 - checksum: a681341e43b4da7a8acb19e1a6ba0355b1af146fa0191f2554a98950cf85f898af6ae3ab0b0287d6c871f5465ec57cb38363b96b5019f9f77ba6f30eca39ede5 - languageName: node - linkType: hard - "@octokit/request@npm:^5.4.14, @octokit/request@npm:^5.6.3": version: 5.6.3 resolution: "@octokit/request@npm:5.6.3" @@ -14293,19 +14246,6 @@ __metadata: languageName: node linkType: hard -"@octokit/request@npm:^8.0.1": - version: 8.1.2 - resolution: "@octokit/request@npm:8.1.2" - dependencies: - "@octokit/endpoint": ^9.0.0 - "@octokit/request-error": ^5.0.0 - "@octokit/types": ^12.0.0 - is-plain-object: ^5.0.0 - universal-user-agent: ^6.0.0 - checksum: 77b9221916f557bba633293ee0d1418766ae59fdfd7ccd626bbcbf0748c6d5dec80fead29f62d8eb427b32e4d8fc4de61c3f9d23999563580890b80b52ccc8e6 - languageName: node - linkType: hard - "@octokit/rest@npm:^19.0.3": version: 19.0.13 resolution: "@octokit/rest@npm:19.0.13" @@ -14325,15 +14265,6 @@ __metadata: languageName: node linkType: hard -"@octokit/types@npm:^12.0.0": - version: 12.0.0 - resolution: "@octokit/types@npm:12.0.0" - dependencies: - "@octokit/openapi-types": ^19.0.0 - checksum: ad55e13cbeef96a63d0088df2ed0a8f3ca764db3f877aa2ecb1693de40b03c1f8e392603bd7fddaaaa74138970ea39f46e4b830d15eeeba74be1671f36440129 - languageName: node - linkType: hard - "@octokit/types@npm:^6.0.3, @octokit/types@npm:^6.10.0, @octokit/types@npm:^6.12.2, @octokit/types@npm:^6.16.1, @octokit/types@npm:^6.8.2": version: 6.41.0 resolution: "@octokit/types@npm:6.41.0" @@ -41927,7 +41858,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0, uuid@npm:^9.0.1": +"uuid@npm:^9.0.0": version: 9.0.1 resolution: "uuid@npm:9.0.1" bin: @@ -42687,7 +42618,7 @@ __metadata: languageName: node linkType: hard -"winston@npm:^3.10.0, winston@npm:^3.2.1": +"winston@npm:^3.2.1": version: 3.10.0 resolution: "winston@npm:3.10.0" dependencies: From 925722fdb4cabb3ee7e404fce745643b425a36e8 Mon Sep 17 00:00:00 2001 From: djamaile Date: Tue, 10 Oct 2023 11:36:53 +0200 Subject: [PATCH 8/8] chore: export remaining objects Signed-off-by: djamaile --- .../catalog-backend-module-github-org/api-report.md | 10 ++++++++++ plugins/catalog-backend-module-github-org/src/index.ts | 6 +++++- .../catalog-backend-module-github-org/src/module.ts | 6 +++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-github-org/api-report.md b/plugins/catalog-backend-module-github-org/api-report.md index f5d6c877cc..e39c98182c 100644 --- a/plugins/catalog-backend-module-github-org/api-report.md +++ b/plugins/catalog-backend-module-github-org/api-report.md @@ -4,6 +4,7 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; +import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { GithubMultiOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-github'; import { TeamTransformer } from '@backstage/plugin-catalog-backend-module-github'; import { UserTransformer } from '@backstage/plugin-catalog-backend-module-github'; @@ -14,6 +15,15 @@ export default catalogModuleGithubOrgEntityProvider; export { GithubMultiOrgEntityProvider }; +// @public +export interface GithubOrgEntityProviderTransformsExtensionPoint { + setTeamTransformer(transformer: TeamTransformer): void; + setUserTransformer(transformer: UserTransformer): void; +} + +// @public +export const githubOrgEntityProviderTransformsExtensionPoint: ExtensionPoint; + export { TeamTransformer }; export { UserTransformer }; diff --git a/plugins/catalog-backend-module-github-org/src/index.ts b/plugins/catalog-backend-module-github-org/src/index.ts index 157772516d..03d22b1a79 100644 --- a/plugins/catalog-backend-module-github-org/src/index.ts +++ b/plugins/catalog-backend-module-github-org/src/index.ts @@ -19,7 +19,11 @@ * * @packageDocumentation */ -export { catalogModuleGithubOrgEntityProvider as default } from './module'; +export { + catalogModuleGithubOrgEntityProvider as default, + type GithubOrgEntityProviderTransformsExtensionPoint, + githubOrgEntityProviderTransformsExtensionPoint, +} from './module'; /** * * TODO(djamaile): GithubMultiOrgEntityProvider should be mirgated over to this module. diff --git a/plugins/catalog-backend-module-github-org/src/module.ts b/plugins/catalog-backend-module-github-org/src/module.ts index 7e6679b55e..e510464bb7 100644 --- a/plugins/catalog-backend-module-github-org/src/module.ts +++ b/plugins/catalog-backend-module-github-org/src/module.ts @@ -35,7 +35,7 @@ import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/ /** * Interface for {@link githubOrgEntityProviderTransformsExtensionPoint}. * - * @alpha + * @public */ export interface GithubOrgEntityProviderTransformsExtensionPoint { /** @@ -52,9 +52,9 @@ export interface GithubOrgEntityProviderTransformsExtensionPoint { } /** - * Extension point for runtime configuration of {@link catalogModuleGithubOrgEntityProvider}. + * Extension point for runtime configuration of catalogModuleGithubOrgEntityProvider. * - * @alpha + * @public */ export const githubOrgEntityProviderTransformsExtensionPoint = createExtensionPoint({