mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
14 lines
412 B
TypeScript
14 lines
412 B
TypeScript
import type { RenovateConfig } from '../../config/types';
|
|
import {
|
|
REPOSITORY_DISABLED_BY_CONFIG,
|
|
REPOSITORY_FORKED,
|
|
} from '../../constants/error-messages';
|
|
|
|
export function checkIfConfigured(config: RenovateConfig): void {
|
|
if (config.enabled === false) {
|
|
throw new Error(REPOSITORY_DISABLED_BY_CONFIG);
|
|
}
|
|
if (config.isFork && !config.includeForks) {
|
|
throw new Error(REPOSITORY_FORKED);
|
|
}
|
|
}
|