From 375423268c7cab6b3d859bbcc1230487a5cb5f02 Mon Sep 17 00:00:00 2001 From: Jack Palmer Date: Wed, 9 Apr 2025 20:26:41 +0100 Subject: [PATCH 1/2] fix: Add missing types to config.d.ts Signed-off-by: Jack Palmer --- .../catalog-backend-module-gitlab/config.d.ts | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-gitlab/config.d.ts b/plugins/catalog-backend-module-gitlab/config.d.ts index e41de67208..4cc7ebe844 100644 --- a/plugins/catalog-backend-module-gitlab/config.d.ts +++ b/plugins/catalog-backend-module-gitlab/config.d.ts @@ -33,11 +33,25 @@ export interface Config { * If not defined the whole instance will be scanned. */ group?: string; + /** + * If true, the provider will only ingest users that are part of the configured group. + */ + restrictUsersToGroup?: boolean; /** * (Optional) Default branch to read the catalog-info.yaml file. * If not set, 'master' will be used. */ branch?: string; + /** + * If no `branch` is configured and there is no default branch defined at the project as well, this fallback is used + * to discover catalog files. + * Defaults to: `master` + */ + fallbackBranch?: string; + /** + * Defaults to `catalog-info.yaml` + */ + catalogFile?: string; /** * (Optional) The name used for the catalog file. * If not set, 'catalog-info.yaml' will be used. @@ -59,6 +73,26 @@ export interface Config { * (Optional) RegExp for the Group Name Pattern */ groupPattern?: string; + /** + * Specifies the types of group membership relations that should be included when ingesting data. + * + * The following values are valid: + * - 'DIRECT': Direct members of the group. This is the default relation and is always included. + * - 'INHERITED': Members inherited from parent (ascendant) groups. + * - 'DESCENDANTS': Members from child (descendant) groups. + * - 'SHARED_FROM_GROUPS': Members shared from other groups. + * + * See: https://docs.gitlab.com/ee/api/graphql/reference/#groupmemberrelation + * + * If the `relations` array is provided in the app-config.yaml, it should contain any combination of the above values. + * The 'DIRECT' relation is automatically included and cannot be excluded, even if not specified. + */ + relations?: string[]; + /** + * Enable org ingestion + * Defaults to `false` + */ + orgEnabled?: boolean; /** * (Optional) Skip forked repository */ @@ -72,7 +106,12 @@ export interface Config { * Should be in the format group/subgroup/repo, with no leading or trailing slashes. */ excludeRepos?: string[]; - + /** + * If true, users without a seat will be included in the catalog. + * Group/Application Access Tokens are still filtered out but you might find service accounts or other users without a seat. + * Defaults to `false` + */ + includeUsersWithoutSeat?: boolean; /** * (Optional) If true, limit by repositories that the current user is a member of. * See: https://docs.gitlab.com/api/projects/#list-projects From 871a8db6c013b2382ff187c7804797a888fbafe7 Mon Sep 17 00:00:00 2001 From: Jack Palmer Date: Wed, 9 Apr 2025 20:29:37 +0100 Subject: [PATCH 2/2] chore: changeset Signed-off-by: Jack Palmer --- .changeset/wicked-ideas-cross.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wicked-ideas-cross.md diff --git a/.changeset/wicked-ideas-cross.md b/.changeset/wicked-ideas-cross.md new file mode 100644 index 0000000000..95c8fed42e --- /dev/null +++ b/.changeset/wicked-ideas-cross.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-gitlab': patch +--- + +fix: Add missing config options to config declaration file