From 1d0d1a3a451580d828ceb115154f9e3dd2a6966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96stberg?= Date: Wed, 9 Dec 2020 12:32:09 +0100 Subject: [PATCH 1/3] Fix missing baseUrl in graphql client for GHE --- .../src/ingestion/processors/GithubOrgReaderProcessor.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts b/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts index 9aecb8b86e..a1e8b5dad5 100644 --- a/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts +++ b/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts @@ -64,6 +64,7 @@ export class GithubOrgReaderProcessor implements CatalogProcessor { const client = !provider.token ? graphql : graphql.defaults({ + baseUrl: provider.apiBaseUrl, headers: { authorization: `token ${provider.token}`, }, From 704f7c7be0b4b0f785fecb43efb6d8e0ed54ceb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96stberg?= Date: Wed, 9 Dec 2020 12:35:22 +0100 Subject: [PATCH 2/3] Update app-config.yaml --- app-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-config.yaml b/app-config.yaml index 9d4d702473..0eb00ebbf3 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -133,7 +133,7 @@ catalog: $env: GITHUB_TOKEN #### Example for how to add your GitHub Enterprise instance using the API: # - target: https://ghe.example.net - # apiBaseUrl: https://ghe.example.net/api/v3 + # apiBaseUrl: https://ghe.example.net/api # token: # $env: GHE_TOKEN ldapOrg: From c6eeefa35d291a6334e805e3713a4f6f6175e8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96stberg?= Date: Thu, 10 Dec 2020 12:18:53 +0100 Subject: [PATCH 3/3] Add changeset --- .changeset/calm-scissors-jam.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/calm-scissors-jam.md diff --git a/.changeset/calm-scissors-jam.md b/.changeset/calm-scissors-jam.md new file mode 100644 index 0000000000..b0939188ef --- /dev/null +++ b/.changeset/calm-scissors-jam.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': minor +--- + +Add support for Github Enterprise in GitHubOrgReaderProcessor so you can properly ingest users of a GHE organization.