renovate/lib/workers/repository/configured.ts

15 lines
381 B
TypeScript
Raw Normal View History

2020-05-01 16:03:48 +00:00
import { RenovateConfig } from '../../config';
import {
REPOSITORY_DISABLED,
REPOSITORY_FORKED,
} from '../../constants/error-messages';
export function checkIfConfigured(config: RenovateConfig): void {
if (config.enabled === false) {
throw new Error(REPOSITORY_DISABLED);
}
2018-12-31 05:46:00 +00:00
if (config.isFork && !config.includeForks) {
throw new Error(REPOSITORY_FORKED);
}
}