github catalog - remove backend-common

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2025-04-16 10:23:45 -05:00
parent 51105a038c
commit ff335e5456
5 changed files with 8 additions and 16 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-github': minor
---
**BREAKING** The `GithubLocationAnalyzer` now requires the `AuthService` when being constructed and the `TokenManger` has been removed.
@@ -51,7 +51,6 @@
"test": "backstage-cli package test"
},
"dependencies": {
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-plugin-api": "workspace:^",
"@backstage/catalog-client": "workspace:^",
"@backstage/catalog-model": "workspace:^",
@@ -26,7 +26,6 @@ import { SchedulerService } from '@backstage/backend-plugin-api';
import { SchedulerServiceTaskRunner } from '@backstage/backend-plugin-api';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { ScmLocationAnalyzer } from '@backstage/plugin-catalog-node';
import { TokenManager } from '@backstage/backend-common';
import { UserEntity } from '@backstage/catalog-model';
// @public
@@ -128,8 +127,7 @@ export class GithubLocationAnalyzer implements ScmLocationAnalyzer {
export type GithubLocationAnalyzerOptions = {
config: Config;
discovery: DiscoveryService;
tokenManager?: TokenManager;
auth?: AuthService;
auth: AuthService;
githubCredentialsProvider?: GithubCredentialsProvider;
catalog?: CatalogApi;
};
@@ -28,10 +28,6 @@ import {
AnalyzeOptions,
ScmLocationAnalyzer,
} from '@backstage/plugin-catalog-node';
import {
TokenManager,
createLegacyAuthAdapters,
} from '@backstage/backend-common';
import { Config } from '@backstage/config';
import { AuthService, DiscoveryService } from '@backstage/backend-plugin-api';
import { extname } from 'path';
@@ -40,8 +36,7 @@ import { extname } from 'path';
export type GithubLocationAnalyzerOptions = {
config: Config;
discovery: DiscoveryService;
tokenManager?: TokenManager;
auth?: AuthService;
auth: AuthService;
githubCredentialsProvider?: GithubCredentialsProvider;
catalog?: CatalogApi;
};
@@ -61,11 +56,7 @@ export class GithubLocationAnalyzer implements ScmLocationAnalyzer {
options.githubCredentialsProvider ||
DefaultGithubCredentialsProvider.fromIntegrations(this.integrations);
this.auth = createLegacyAuthAdapters({
auth: options.auth,
discovery: options.discovery,
tokenManager: options.tokenManager,
}).auth;
this.auth = options.auth;
}
supports(url: string) {
-1
View File
@@ -5579,7 +5579,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github"
dependencies:
"@backstage/backend-common": "npm:^0.25.0"
"@backstage/backend-plugin-api": "workspace:^"
"@backstage/backend-test-utils": "workspace:^"
"@backstage/catalog-client": "workspace:^"