From 23b69dcd5182c40bce41cc1d57aa6cffe5abbea5 Mon Sep 17 00:00:00 2001 From: Leon van Ginneken Date: Tue, 14 Sep 2021 14:28:57 +0200 Subject: [PATCH 1/3] Document the default scan option for the org Signed-off-by: Leon --- docs/integrations/github/discovery.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/integrations/github/discovery.md b/docs/integrations/github/discovery.md index a578d0893d..761cdaec46 100644 --- a/docs/integrations/github/discovery.md +++ b/docs/integrations/github/discovery.md @@ -19,13 +19,17 @@ to the catalog configuration: ```yaml catalog: locations: + # (since 0.13.5) Scan all repositories for a catalog-info.yaml in the root of the default branch - type: github-discovery - target: https://github.com/myorg/service-*/blob/main/catalog-info.yaml + target: https://github.com/myorg + # Or use a custom pattern for discovering catalog entity descriptor files + - type: github-discovery + target: https://github.com/myorg/service-*/blob/main/your-own-format.yaml ``` Note the `github-discovery` type, as this is not a regular `url` processor. -The target is composed of three parts: +When using a custom pattern, the target is composed of three parts: - The base organization URL, `https://github.com/myorg` in this case - The repository blob to scan, which accepts \* wildcard tokens. This can simply @@ -34,7 +38,7 @@ The target is composed of three parts: - The path within each repository to find the catalog YAML file. This will usually be `/blob/main/catalog-info.yaml`, `/blob/master/catalog-info.yaml` or a similar variation for catalog files stored in the root directory of each - repository. + repository. You could also use a dash (`-`) for referring to the default branch. ## GitHub API Rate Limits From 2d2de6bda5b6f8a1d8703a2c4b9613ba1702bcce Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 14 Sep 2021 15:31:25 +0200 Subject: [PATCH 2/3] added more examples Signed-off-by: Leon --- docs/integrations/github/discovery.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/integrations/github/discovery.md b/docs/integrations/github/discovery.md index 761cdaec46..51a71ec5ae 100644 --- a/docs/integrations/github/discovery.md +++ b/docs/integrations/github/discovery.md @@ -22,9 +22,15 @@ catalog: # (since 0.13.5) Scan all repositories for a catalog-info.yaml in the root of the default branch - type: github-discovery target: https://github.com/myorg - # Or use a custom pattern for discovering catalog entity descriptor files + # Or use a custom pattern for a subset of all repositories - type: github-discovery - target: https://github.com/myorg/service-*/blob/main/your-own-format.yaml + target: https://github.com/myorg/service-*/blob/-/catalog-info.yaml + # Or use a custom file format and location + - type: github-discovery + target: https://github.com/*/blob/-/docs/your-own-format.yaml + # Or use a specific branch-name + - type: github-discovery + target: https://github.com/*/blob/backstage-docs/catalog-info.yaml ``` Note the `github-discovery` type, as this is not a regular `url` processor. From 249b33d1a57ee373708dfb2fc48a83100220a43f Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 15 Sep 2021 11:22:01 +0200 Subject: [PATCH 3/3] docs: fixing prettier warnings and reword the text Signed-off-by: blam --- docs/integrations/github/discovery.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/integrations/github/discovery.md b/docs/integrations/github/discovery.md index 51a71ec5ae..71b04c0a4a 100644 --- a/docs/integrations/github/discovery.md +++ b/docs/integrations/github/discovery.md @@ -22,7 +22,7 @@ catalog: # (since 0.13.5) Scan all repositories for a catalog-info.yaml in the root of the default branch - type: github-discovery target: https://github.com/myorg - # Or use a custom pattern for a subset of all repositories + # Or use a custom pattern for a subset of all repositories with default repository - type: github-discovery target: https://github.com/myorg/service-*/blob/-/catalog-info.yaml # Or use a custom file format and location @@ -44,7 +44,8 @@ When using a custom pattern, the target is composed of three parts: - The path within each repository to find the catalog YAML file. This will usually be `/blob/main/catalog-info.yaml`, `/blob/master/catalog-info.yaml` or a similar variation for catalog files stored in the root directory of each - repository. You could also use a dash (`-`) for referring to the default branch. + repository. You could also use a dash (`-`) for referring to the default + branch. ## GitHub API Rate Limits