From af045e3a77ac63775c9ed70cc9b2d77f2c26d675 Mon Sep 17 00:00:00 2001 From: Nir Gazit Date: Thu, 28 Jan 2021 14:37:44 +0200 Subject: [PATCH] Extended changelist docs; Fixed lint errors --- .changeset/moody-mice-cheer.md | 12 +++++++++++- .../src/ingestion/processors/github/github.ts | 7 +------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.changeset/moody-mice-cheer.md b/.changeset/moody-mice-cheer.md index bdbb0722b0..f2e5d29ba1 100644 --- a/.changeset/moody-mice-cheer.md +++ b/.changeset/moody-mice-cheer.md @@ -2,4 +2,14 @@ '@backstage/plugin-catalog-backend': minor --- -Added an option to scan github for repositories using a new location type 'github-discovery' +Added an option to scan GitHub for repositories using a new location type `github-discovery`. +Example: + +```yaml +type: 'github-discovery', +target: + 'https://github.com/backstage/techdocs-*/blob/master/catalog.yaml' +``` + +You can use wildcards (`*`) as well. This will add `location` entities for each matching repository. +Currently though, you must specify the exact path of the `catalog.yaml` file in the repository. diff --git a/plugins/catalog-backend/src/ingestion/processors/github/github.ts b/plugins/catalog-backend/src/ingestion/processors/github/github.ts index cd4719c46f..d50887c592 100644 --- a/plugins/catalog-backend/src/ingestion/processors/github/github.ts +++ b/plugins/catalog-backend/src/ingestion/processors/github/github.ts @@ -14,13 +14,8 @@ * limitations under the License. */ -import { - GroupEntity, - LocationEntity, - UserEntity, -} from '@backstage/catalog-model'; +import { GroupEntity, UserEntity } from '@backstage/catalog-model'; import { graphql } from '@octokit/graphql'; -import { xorWith } from 'lodash/fp'; // Graphql types