@backstage/plugin-catalog-backend 0.19.3 → 0.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 0.19.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 7d4b4e937c: Uptake changes to the GitHub Credentials Provider interface.
8
+ - 3a63491c5f: Filter out projects with missing `default_branch` from GitLab Discovery.
9
+ - Updated dependencies
10
+ - @backstage/backend-common@0.10.1
11
+ - @backstage/integration@0.7.0
12
+
3
13
  ## 0.19.3
4
14
 
5
15
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -1116,7 +1116,7 @@ class GithubDiscoveryProcessor {
1116
1116
  }
1117
1117
  const { org, repoSearchPath, catalogPath, branch, host } = parseUrl$2(location$1.target);
1118
1118
  const orgUrl = `https://${host}/${org}`;
1119
- const { headers } = await integration.GithubCredentialsProvider.create(gitHubConfig).getCredentials({ url: orgUrl });
1119
+ const { headers } = await integration.SingleInstanceGithubCredentialsProvider.create(gitHubConfig).getCredentials({ url: orgUrl });
1120
1120
  const client = graphql.graphql.defaults({
1121
1121
  baseUrl: gitHubConfig.apiBaseUrl,
1122
1122
  headers
@@ -1331,7 +1331,7 @@ class GithubOrgReaderProcessor {
1331
1331
  if (!gitHubConfig) {
1332
1332
  throw new Error(`There is no GitHub Org provider that matches ${orgUrl}. Please add a configuration for an integration.`);
1333
1333
  }
1334
- const credentialsProvider = integration.GithubCredentialsProvider.create(gitHubConfig);
1334
+ const credentialsProvider = integration.SingleInstanceGithubCredentialsProvider.create(gitHubConfig);
1335
1335
  const { headers, type: tokenType } = await credentialsProvider.getCredentials({
1336
1336
  url: orgUrl
1337
1337
  });
@@ -1369,7 +1369,7 @@ class GithubMultiOrgReaderProcessor {
1369
1369
  }
1370
1370
  const allUsersMap = /* @__PURE__ */ new Map();
1371
1371
  const baseUrl = new URL(location.target).origin;
1372
- const credentialsProvider = integration.GithubCredentialsProvider.create(gitHubConfig);
1372
+ const credentialsProvider = integration.SingleInstanceGithubCredentialsProvider.create(gitHubConfig);
1373
1373
  const orgsToProcess = this.orgs.length ? this.orgs : await this.getAllOrgs(gitHubConfig);
1374
1374
  for (const orgConfig of orgsToProcess) {
1375
1375
  try {
@@ -1516,9 +1516,13 @@ class GitLabDiscoveryProcessor {
1516
1516
  };
1517
1517
  for await (const project of projects) {
1518
1518
  result.scanned++;
1519
- if (!project.archived) {
1520
- result.matches.push(project);
1519
+ if (project.archived) {
1520
+ continue;
1521
+ }
1522
+ if (branch === "*" && project.default_branch === void 0) {
1523
+ continue;
1521
1524
  }
1525
+ result.matches.push(project);
1522
1526
  }
1523
1527
  for (const project of result.matches) {
1524
1528
  const project_branch = branch === "*" ? project.default_branch : branch;
@@ -1835,7 +1839,7 @@ const defaultEntityDataParser = async function* defaultEntityDataParser2({ data,
1835
1839
  class GitHubOrgEntityProvider {
1836
1840
  constructor(options) {
1837
1841
  this.options = options;
1838
- this.credentialsProvider = integration.GithubCredentialsProvider.create(options.gitHubConfig);
1842
+ this.credentialsProvider = integration.SingleInstanceGithubCredentialsProvider.create(options.gitHubConfig);
1839
1843
  }
1840
1844
  static fromConfig(config, options) {
1841
1845
  var _a;