move enabled check before schedule check
Signed-off-by: Dominik Pfaffenbauer <dominik@pfaffenbauer.at>
This commit is contained in:
+5
-4
@@ -78,6 +78,11 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
|
||||
providerConfigs.forEach(providerConfig => {
|
||||
const integration = integrations.byHost(providerConfig.host);
|
||||
|
||||
if (!providerConfig.orgEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!integration) {
|
||||
throw new Error(
|
||||
`No gitlab integration found that matches host ${providerConfig.host}`,
|
||||
@@ -90,10 +95,6 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
);
|
||||
}
|
||||
|
||||
if (!providerConfig.orgEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const taskRunner =
|
||||
options.schedule ??
|
||||
options.scheduler!.createScheduledTaskRunner(providerConfig.schedule!);
|
||||
|
||||
Reference in New Issue
Block a user