mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
5c198049f7
Previously, @danslo reported that he tried to use `custom_versions` without setting the kind. This isn't the correct behavior. I've added a validator to alert him of this.
12 lines
448 B
TypeScript
12 lines
448 B
TypeScript
import { customVersionsValidator } from "./validations/custom-versions-validator";
|
|
import { isKnownKind } from "./validations/is-known-kind";
|
|
import { KindValidator } from "./validator";
|
|
|
|
export const validateKind: KindValidator = (kind, custom_versions = null): boolean => {
|
|
return validators.reduce((acc, el) => el(kind, custom_versions), true);
|
|
}
|
|
|
|
export const validators: KindValidator[] = [
|
|
isKnownKind,
|
|
customVersionsValidator,
|
|
]; |