fix: add allowInherited to readGitlabConfig function

Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
This commit is contained in:
ElaineDeMattosSilvaB
2024-04-06 08:20:33 +02:00
parent d2928ac3c4
commit 0b208f831d
2 changed files with 7 additions and 0 deletions
@@ -58,6 +58,7 @@ describe('config', () => {
groupPattern: /[\s\S]*/,
userPattern: /[\s\S]*/,
orgEnabled: false,
allowInherited: false,
schedule: undefined,
skipForkedRepos: false,
}),
@@ -95,6 +96,7 @@ describe('config', () => {
groupPattern: /[\s\S]*/,
userPattern: /[\s\S]*/,
orgEnabled: false,
allowInherited: false,
schedule: undefined,
skipForkedRepos: false,
}),
@@ -133,6 +135,7 @@ describe('config', () => {
groupPattern: /[\s\S]*/,
userPattern: /[\s\S]*/,
orgEnabled: false,
allowInherited: false,
schedule: undefined,
skipForkedRepos: true,
}),
@@ -173,6 +176,7 @@ describe('config', () => {
groupPattern: /[\s\S]*/,
userPattern: /[\s\S]*/,
orgEnabled: false,
allowInherited: false,
skipForkedRepos: false,
schedule: {
frequency: Duration.fromISO('PT30M'),
@@ -43,6 +43,8 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig {
config.getOptionalString('groupPattern') ?? /[\s\S]*/,
);
const orgEnabled: boolean = config.getOptionalBoolean('orgEnabled') ?? false;
const allowInherited: boolean =
config.getOptionalBoolean('allowInherited') ?? false;
const skipForkedRepos: boolean =
config.getOptionalBoolean('skipForkedRepos') ?? false;
@@ -62,6 +64,7 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig {
groupPattern,
schedule,
orgEnabled,
allowInherited,
skipForkedRepos,
};
}