Added project pattern for GitLab provider to be able to filter projects on more granular level.

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2022-08-02 13:18:03 +02:00
parent 986fcb39d8
commit 77e84d6ea4
2 changed files with 3 additions and 1 deletions
@@ -52,6 +52,7 @@ describe('config', () => {
branch: 'master',
host: 'host',
catalogFile: 'catalog-info.yaml',
projectPattern: /[\s\S]*/,
}),
);
});
@@ -81,6 +82,7 @@ describe('config', () => {
branch: 'not-master',
host: 'host',
catalogFile: 'custom-file.yaml',
projectPattern: /[\s\S]*/,
}),
);
});
@@ -32,7 +32,7 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig {
const catalogFile =
config.getOptionalString('entityFilename') ?? 'catalog-info.yaml';
const projectPattern = new RegExp(
config.getString('projectPattern') ?? /[\s\S]*/,
config.getOptionalString('projectPattern') ?? /[\s\S]*/,
);
return {