Add BitbucketDiscoveryProcessor to the list of enabled processors

Signed-off-by: Mathias Åhsberg <mathias.ahsberg@resurs.se>
This commit is contained in:
Mathias Åhsberg
2021-03-29 09:11:05 +00:00
parent ddaff02d11
commit 2d2b955ed1
5 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
---
'@backstage/plugin-catalog-backend': minor
'@backstage/plugin-catalog-backend': patch
---
Add Bitbucket Server discovery processor.
@@ -63,7 +63,6 @@ export class BitbucketDiscoveryProcessor implements CatalogProcessor {
const client = new BitbucketClient({
config: bitbucketConfig,
logger: this.logger,
});
const startTimestamp = Date.now();
this.logger.info(`Reading Bitbucket repositories from ${location.target}`);
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Logger } from 'winston';
import fetch from 'cross-fetch';
import {
@@ -23,11 +22,9 @@ import {
export class BitbucketClient {
private readonly config: BitbucketIntegrationConfig;
private readonly logger: Logger;
constructor(options: { config: BitbucketIntegrationConfig; logger: Logger }) {
constructor(options: { config: BitbucketIntegrationConfig }) {
this.config = options.config;
this.logger = options.logger;
}
async listProjects(options?: ListOptions): Promise<PagedResponse<any>> {
@@ -19,6 +19,7 @@ import * as results from './results';
export { AnnotateLocationEntityProcessor } from './AnnotateLocationEntityProcessor';
export { AnnotateScmSlugEntityProcessor } from './AnnotateScmSlugEntityProcessor';
export { AwsOrganizationCloudAccountProcessor } from './AwsOrganizationCloudAccountProcessor';
export { BitbucketDiscoveryProcessor } from './BitbucketDiscoveryProcessor';
export { BuiltinKindsEntityProcessor } from './BuiltinKindsEntityProcessor';
export { CodeOwnersProcessor } from './CodeOwnersProcessor';
export { FileReaderProcessor } from './FileReaderProcessor';
@@ -38,6 +38,7 @@ import {
import { DatabaseManager } from '../database';
import {
AnnotateLocationEntityProcessor,
BitbucketDiscoveryProcessor,
BuiltinKindsEntityProcessor,
CatalogProcessor,
CatalogProcessorParser,
@@ -304,6 +305,7 @@ export class CatalogBuilder {
if (!this.processorsReplace) {
processors.push(
new FileReaderProcessor(),
BitbucketDiscoveryProcessor.fromConfig(config, { logger }),
GithubDiscoveryProcessor.fromConfig(config, { logger }),
GithubOrgReaderProcessor.fromConfig(config, { logger }),
LdapOrgReaderProcessor.fromConfig(config, { logger }),