# No defaults are provided here as the config is merged on top of the # manifest. *[ schema.OptionalNoDefault(item.key, item.check_fn) for item in MANIFEST_HOOK_DICT.items if item.key != 'id' ]) CONFIG_REPO_DICT = schema.Map( 'Repository', 'repo', schema.Required('repo', schema.check_string), schema.RequiredRecurse('hooks', schema.Array(CONFIG_HOOK_DICT)), schema.Conditional( 'sha', schema.check_string, condition_key='repo', condition_value=schema.Not(_LOCAL_SENTINEL), ensure_absent=True, ), ) CONFIG_SCHEMA = schema.Array(CONFIG_REPO_DICT) def is_local_repo(repo_entry): return repo_entry['repo'] == _LOCAL_SENTINEL class InvalidConfigError(FatalError): pass load_config = functools.partial(
# manifest. *[ schema.OptionalNoDefault(item.key, item.check_fn) for item in MANIFEST_HOOK_DICT.items if item.key != 'id' ] ) CONFIG_REPO_DICT = schema.Map( 'Repository', 'repo', schema.Required('repo', schema.check_string), schema.RequiredRecurse('hooks', schema.Array(CONFIG_HOOK_DICT)), schema.Conditional( 'sha', schema.check_string, condition_key='repo', condition_value=schema.Not(_LOCAL_SENTINEL), ensure_absent=True, ), ) CONFIG_SCHEMA = schema.Array(CONFIG_REPO_DICT) def is_local_repo(repo_entry): return repo_entry['repo'] == _LOCAL_SENTINEL class InvalidConfigError(FatalError): pass load_config = functools.partial(